Get a content type

get

/km/api/v1/contentTypes/{id}

This method returns the ContentType object having the specified ID parameter.

Example URIs

The example URIs for this method are as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/contentTypes/{id}

    The request returns the ContentType object having specified ID parameter in FULL mode.

  • http://<IM_REST_API_HOST>/km/api/contentTypes/{id}?mode=KEY

    The request returns the ContentType object having specified ID parameter in the KEY mode.

  • http://<IM_REST_API_HOST>/km/api/contentTypes/{id}?mode=DATA

    The request returns the ContentType object having specified ID parameter in the DATA mode.

  • http://<IM_REST_API_HOST>/km/api/contentTypes/{id}?mode=EXTENDED

    The request returns the ContentType object having specified ID parameter in the EXTENDED mode.

Response Errors

  • OKDOM-GEN0001

    This error occurs when an invalid id has been given.

Request

Path Parameters
  • The unique identifier of the object to be retrieved.
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ContentType
Type: object
Title: ContentType
Show Source
Nested Schema : categories
Type: array

The list of Category objects configured in the content type, which are available to the content authors to assign to the content. The Category objects are used to tag or label the content to improve searchability.

Show Source
Nested Schema : Schema
Type: object
Title: Schema
Show Source
Nested Schema : customMetrics
Type: array

The unit of measurement used to track the activities on the content in a content type.

Show Source
Nested Schema : localizedAttributes
Type: array
List of LocalizedAttributes of this ContentType name and description in various Locales
Show Source
Nested Schema : RatingKey
Type: object
Title: RatingKey
Show Source
Nested Schema : requiredCategories
Type: array

The Category objects that the content type requires for all its contents. The content authors must assign these categories to the content while content authoring. Authors are not allowed to save the content if they do not assign the categories.

Show Source
Nested Schema : translationRequestLocales
Type: array

The list of Locale objects for which the automatic translation request is enabled in the content type. The content type sends translation requests to content translators of specific set of languages, each time the content is ready for publication.

Show Source
Nested Schema : userGroups
Type: array

The UserGroup objects associated with the content type. Content authors assign a user Group to the content, so that users with a certain level of access will have access to the content.

Show Source
Nested Schema : WorkflowKey
Type: object
Title: WorkflowKey
Show Source
Nested Schema : CategoryKey
Type: object
Title: CategoryKey
Show Source
  • This field will return number of immediate children a category has.

    This field will only be populated if childrenCount query parameter is passed in with value true.

    Example URIs for the this parameter are as follows:

    • http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?childrenCount=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&childrenCount=true&mode=KEY
  • Description of the Category object
  • The unique identifier used while integrating the repository data with the external system.

  • The type of the category used while integrating the repository data with the external system. Valid options are PRODUCT and CATEGORY.

  • The inventory organization id of the specific product.

  • links
  • The name of the category.

  • The hierarchichal position of the category
  • parents

    This field will return all parents of category.

    This field will only be populated if withParents query parameter is passed in with value true.

    Example URIs for the this parameter are as follows:

    • http://<IM_REST_API_HOST>/km/api/categories/{id}?withParents=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?withParents=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&withParents=true&mode=KEY
    • http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&withParents=true&mode=KEY
  • The unique record ID of the Category object.

  • The reference key for the Category object. Category objects support multiple languages. This field can be used to identify the associated objects for all languages.

  • This is a custom field that will get populated if a name is translated into the default locale when the translated name is not found.

Nested Schema : parents
Type: array

This field will return all parents of category.

This field will only be populated if withParents query parameter is passed in with value true.

Example URIs for the this parameter are as follows:

  • http://<IM_REST_API_HOST>/km/api/categories/{id}?withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories?withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&withParents=true&mode=KEY
  • http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&withParents=true&mode=KEY
Show Source
Nested Schema : schemaAttributes
Type: array
List of schema attributes for the schema
Show Source
Nested Schema : SchemaAttribute
Type: object
Title: SchemaAttribute
Show Source
Nested Schema : children
Type: array
List of child nodes of the current element
Show Source
Nested Schema : localizedAttributes
Type: array
List of LocalizedAttributes of this SchemaAttribute name and description in various Locales
Show Source
Nested Schema : schemaAttributeUserGroupList
Type: array
List of user groups that can be used to secure this attribute. This should be a subset of the list of user groups assigned to the ContentType
Show Source
Nested Schema : LocalizedAttributes
Type: object
Title: LocalizedAttributes
Show Source
Nested Schema : SchemaAttributeUserGroup
Type: object
Title: SchemaAttributeUserGroup
Show Source
Nested Schema : UserGroupKey
Type: object
Title: UserGroupKey
Show Source
Nested Schema : CustomMetricKey
Type: object
Title: CustomMetricKey
Show Source
Nested Schema : LocaleKey
Type: object
Title: LocaleKey
Show Source
Back to Top

Examples

The following example shows how to find the Content Type object that has the specified ID by submitting a get request on the REST resource using cURL.

curl -X GET "https://<IM_REST_API_HOST>/km/api/latest/contentTypes/{id}" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json"

Example of Response Body

The following example shows the contents of the response body in JSON format:

{
  "userGroups": [
    {
      "recordId": "BDEE31CAA50A4DA7B9789240028BA4E3",
      "referenceKey": "INTERNAL",
      "name": "Internal",
      "links": [
        {
          "rel": "canonical",
          "href": "http://IM_REST_API_HOST/km/api/latest/userGroups/BDEE31CAA50A4DA7B9789240028BA4E3",
          "mediaType": "application/json, application/xml",
          "method": "GET"
        }
      ]
    }
  ],
  "customMetrics": [],
  "requiredCategories": [],
  "categories": [
    {
      "recordId": "0009447D77914B088D3DE12B76065E1B",
      "referenceKey": "FUSION_CATEGORY_300100103980692",
      "objectId": "1000",
      "name": "Category person : 1491880448742",
      "externalId": 300100103980692,
      "externalType": "CATEGORY",
      "description": "119202",
      "links": [
        {
          "rel": "canonical",
          "href": "http://IM_REST_API_HOST/km/api/latest/categories/0009447D77914B088D3DE12B76065E1B",
          "mediaType": "application/json, application/xml",
          "method": "GET"
        }
      ]
    },
  ],
  "translationRequestLocales": [],
  "recordId": "C6FAA0D5AFF442C2BED0EED8D8EDD9C0",
  "referenceKey": "SOLUTION",
  "name": "Solution",
  "links": [
    {
      "rel": "canonical",
      "href": "http://IM_REST_API_HOST/km/api/latest/contentTypes/C6FAA0D5AFF442C2BED0EED8D8EDD9C0",
      "mediaType": "application/json, application/xml",
      "method": "GET"
    },
    {
      "rel": "collection",
      "href": "http://IM_REST_API_HOST/km/api/latest/contentTypes",
      "mediaType": "application/json, application/xml",
      "method": "GET",
      "profile": "http://IM_REST_API_HOST/km/api/latest/metadata-catalog/contentTypes"
    }
  ],
  "allowCheckOut": false,
  "allowRecommendations": false,
  "counterPrefix": "SOL",
  "dateAdded": "2017-03-24T23:53:57-0600",
  "dateModified": "2017-04-26T02:04:50-0600",
  "defaultLifespan": -1,
  "enableUserActivityLogging": false,
  "hasPriority": false,
  "hasRelatedContent": false,
  "hasTalkBack": false,
  "isEvent": false,
  "isModerated": false,
  "requireAtLeastOneProduct": false,
  "requireAtLeastOneCategory": false,
  "requireAtLeastOneUserGroup": false,
  "restrictToOneUserGroupSelection": false,
  "categoriesRequireWorkflowApproval": true,
  "userGroupRequireWorkflowApproval": true,
  "viewsRequireWorkflowApproval": true,
  "displayDatesRequireWorkflowApproval": true,
  "eventDatesRequireWorkflowApproval": true,
  "restrictAuthoringToWorkflowUser": true,
  "notifyOnWorkflowApproval": false,
  "notifyOnWorkflowRejection": false,
  "notifyGroupOnWorkflowRejection": false,
  "removeVersions": false,
  "reviewDate": -1,
  "validateHtml": false,
  "enableIndexing": true,
  "indexStatus": "LIVE",
  "rating": {
    "recordId": "72131BCD2DC94A7DAA3133D5A5E59250",
    "referenceKey": "5_STAR_RATING",
    "name": "5 Star Rating",
    "links": [
      {
        "rel": "canonical",
        "href": "http://IM_REST_API_HOST/km/api/latest/dataForms/72131BCD2DC94A7DAA3133D5A5E59250",
        "mediaType": "application/json, application/xml",
        "method": "GET"
      }
    ]
  },
  "contentSchema": {
    "schemaAttributes": [
      {
        "children": [],
        "schemaAttributeUserGroupList": [],
        "recordId": "34C25D6B395B474DAD1DCE4CFFDC467A",
        "xpath": "//SOLUTION/RESOLUTION",
        "name": "Resolution",
        "links": [
          {
            "rel": "canonical",
            "href": "http://IM_REST_API_HOST/km/api/latest/contentTypes/C6FAA0D5AFF442C2BED0EED8D8EDD9C0/contentSchema/34C25D6B395B474DAD1DCE4CFFDC467A",
            "mediaType": "application/json, application/xml",
            "method": "GET"
          }
        ],
        "requireWorkflowApproval": false,
        "allowPreselectedUserGroupChange": true,
        "counter": 0,
        "dateAdded": "2017-03-24T23:53:57-0600",
        "dateModified": "2017-03-24T23:53:57-0600",
        "enableFullTextSearch": true,
        "includeInMasterIdentifier": false,
        "isNode": false,
        "allowMultipleNodes": false,
        "isRequired": false,
        "readOnly": false,
        "enableAttributeLevelSearch": false,
        "schemaAttrType": "WYSIWYG_EDIT",
        "secureWithUserGroups": false,
        "securedFileResource": false,
        "userGroupSelectionRequired": false,
        "sortOrder": 3,
        "referenceKey": "RESOLUTION",
        "wysiwygType": "FULL"
      },
      {
        "children": [],
        "schemaAttributeUserGroupList": [],
        "recordId": "0E1621B868804CC5899C36A1C426B400",
        "xpath": "//SOLUTION/ENVIRONMENT",
        "name": "Environment",
        "links": [
          {
            "rel": "canonical",
            "href": "http://IM_REST_API_HOST/km/api/latest/contentTypes/C6FAA0D5AFF442C2BED0EED8D8EDD9C0/contentSchema/0E1621B868804CC5899C36A1C426B400",
            "mediaType": "application/json, application/xml",
            "method": "GET"
          }
        ],
        "requireWorkflowApproval": false,
        "allowPreselectedUserGroupChange": true,
        "counter": 0,
        "dateAdded": "2017-03-24T23:53:57-0600",
        "dateModified": "2017-03-24T23:53:57-0600",
        "enableFullTextSearch": true,
        "includeInMasterIdentifier": false,
        "isNode": false,
        "allowMultipleNodes": false,
        "isRequired": false,
        "readOnly": false,
        "enableAttributeLevelSearch": false,
        "schemaAttrType": "WYSIWYG_EDIT",
        "secureWithUserGroups": false,
        "securedFileResource": false,
        "userGroupSelectionRequired": false,
        "sortOrder": 4,
        "referenceKey": "ENVIRONMENT",
        "wysiwygType": "FULL"
      },
    ],
    "recordId": "BC4E496996A141048893C5F13BFAFF77",
    "dateAdded": "2017-03-24T23:53:57-0600",
    "dateModified": "2017-03-24T23:53:57-0600"
  }
}
Back to Top