Get all translated content

get

/km/api/v1/content/{id}/allTranslations

This method returns a list of all available translations of the document having the specified content ID along with the master document. The translations of the document are returned as a list of ContentData object.

Note: The service does not allow mode and isForEdit request parameters with the HTTP request. You cannot request editable document using this service.

Content Security

A web user can access the content in the following conditions. The service uses the security role permissions assigned to the user to display the content.

  • User must have view privilege on the content type in which the specified content record is saved.
  • The views assigned to the user match with at least one of the views assigned to the content.

Response Errors

The possible error responses for this method are as follows:

  • OKDOM-GEN0006

    The error occurs when you specify any invalid value with the contentState parameter in the HTTP service request.

  • OKDOM-GEN0001

    The error occurs when a content with the specified content ID cannot be found.

  • OK-GEN0020

    The error occurs when the mode or langpref request parameter is specified with the HTTP request.

  • Example URIs

    The example URIs for this method are as follows:

    • http://<IM_REST_API_HOST>/km/api/content/{id}/allTranslations

      The request returns all available translations of the specified document including the document having the specified id parameter value. The translated documents are returned as a list of ContentKey objects. By default, service returns the published versions of the documents sorted by date added.

    • http://<IM_REST_API_HOST>/km/api/content/{id}/allTranslations?orderBy=publishDate

      The request returns all available translations of the specified document in the order of publish date including the document having the specified id parameter value. The translated documents are returned as a list of ContentKey objects.

      This resource supports the orderBy request parameter, which allows you to sort the returned list of ContentData objects.

      You can find the different values to use with the orderBy parameter in the schema and catalog information of the resource. To get the schema and catalog information, use GET method with the mediaType value as 'application/schema+json' in the HTTP request.

      The example URI to get schema and catalog information of the resource is as follows: http://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/content

    Request

    Path Parameters
    Back to Top

    Response

    Supported Media Types

    200 Response

    OK.
    Body ()
    Root Schema : ResultList ContentData
    Type: object
    Title: ResultList ContentData
    Show Source
    Nested Schema : items
    Type: array
    Show Source
    Nested Schema : ContentData
    Type: object
    Title: ContentData
    Show Source
    Nested Schema : allTranslations
    Type: array

    This field will return list of all translated content that the user can view

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

    Show Source
    Nested Schema : ArticleStatusKey
    Type: object
    Title: ArticleStatusKey
    Show Source
    • links
    • The localized name of the ArticleStatus object. The name field can only be used for sorting.

    • The unique identifier of the ArticleStatus object.

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

    Nested Schema : LocaleKey
    Type: object
    Title: LocaleKey
    Show Source
    Nested Schema : UserKey
    Type: object
    Title: UserKey
    Show Source
    • Email of the User object
    • The ExternalId is the Id of the corresponding User from an external system. It, along with ExternalType, can be used to bridge the gap between a User from this system and a User from an external system.
    • The ExternalType is the type of the corresponding User from an external system. It, along with ExternalId, can be used to bridge the gap between a User from this system and a User from an external system.
    • links
    • User's full name
    • The unique record ID of the User object.
    Nested Schema : ContentTypeKey
    Type: object
    Title: ContentTypeKey
    Show Source
    • The description for the ContentType object. Content Types support multiple languages.

      This field identifies the object associated with the language specified by the user.

    • links
    • The name for the ContentType object. The name field can only be used for sorting.

      Content Types support multiple languages. This field identifies the object associated with the language specified by the user.

    • The unique identifier of the ContentType object.

    • The reference key for the ContentType object.

      ContentType objects support multiple languages. This field can be used to identify the associated objects for all languages.

    • Lookup code that indicates the stripe code.

    Nested Schema : ContentKey
    Type: object
    Title: ContentKey
    Show Source
    Nested Schema : DataForm
    Type: object
    Title: DataForm
    Show Source
    Nested Schema : AggregateFormResults
    Type: object
    Title: AggregateFormResults
    Show Source
    Nested Schema : schemaAttributes
    Type: array

    This field will return list of schema attributes associated with the content type of this content.

    This field will only be populated if additionalFields query parameter is passed in with value schemaAttributes.

    Show Source
    Nested Schema : allTranslations
    Type: array

    This field will return list of all translated content that the user can view

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

    Show Source
    Nested Schema : schemaAttributes
    Type: array

    This field will return list of schema attributes associated with the content type of this content.

    This field will only be populated if additionalFields query parameter is passed in with value schemaAttributes.

    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
    • The unique identifier of the corresponding userGroup from an external system. You can use the External ID with the ExternalType parameter to connect user groups in the internal and the the external systems.

    • The ExternalType is the type of the corresponding userGroup from an external system.

    • links
    • The localized name of the user group. The name field can only be used for sorting.

    • The unique identifier from the TAG table that represent a userGroups resource

    • The non localized name of the user group

    • Stripe for UserGroup

    Nested Schema : questions
    Type: array
    To Many Relationship to Question
    Show Source
    Nested Schema : views
    Type: array
    To Many Relationship to View
    Show Source
    Nested Schema : DataFormQuestion
    Type: object
    Title: DataFormQuestion
    Show Source
    Nested Schema : answers
    Type: array
    To Many Relationship to Answer
    Show Source
    Nested Schema : DataFormKey
    Type: object
    Title: DataFormKey
    Show Source
    Nested Schema : DataFormAnswer
    Type: object
    Title: DataFormAnswer
    Show Source
    Nested Schema : DataFormQuestionKey
    Type: object
    Title: DataFormQuestionKey
    Show Source
    • links
    • The unique record ID of the DataFormQuestion object.
    • The reference key for the DataFormQuestion object. DataFormQuestion objects support multiple languages. This field can be used to identify the associated objects for all languages.
    Nested Schema : ViewKey
    Type: object
    Title: ViewKey
    Show Source
    Nested Schema : questions
    Type: array
    To Many Relationship to AggregateQuestionResult
    Show Source
    Nested Schema : AggregateQuestionResult
    Type: object
    Title: AggregateQuestionResult
    Show Source
    Nested Schema : answers
    Type: array
    To Many Relationship to AggregateAnswerResult
    Show Source
    Nested Schema : AggregateAnswerResult
    Type: object
    Title: AggregateAnswerResult
    Show Source
    • Localized display name for the Answer
    • The unique record ID of the AggregateAnswerResult object.
    • The reference key for the AggregateAnswerResult object. AggregateAnswerResult objects support multiple languages. This field can be used to identify the associated objects for all languages.
    • TotalResponses of the AggregateAnswerResult object
    Back to Top

    Examples

    The following example shows how to find all the available translations of the document that has the specified content ID.

    curl -X GET "https://<IM_REST_API_HOST>/km/api/latest/content/{id}/allTranslations" -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:

    {
      "items": [
        {
          "contentType": {
            "recordId": "33B9C302D8264371B6A12EDAF3FD974B",
            "referenceKey": "FAQ",
            "name": "NAME_VALUE",
            "links": [
              {
                "rel": "canonical",
                "href": "https://IM_REST_API_HOST/km/api/latest/contentTypes/33B9C302D8264371B6A12EDAF3FD974B",
                "mediaType": "application/json, application/xml",
                "method": "GET"
              }
            ]
          },
          "priority": "PRIORITY_0",
          "createDate": "2017-03-13T15:54:04-0600",
          "dateAdded": "2017-03-13T15:54:05-0600",
          "displayStartDate": "2017-03-13T15:53:24-0600",
          "displayEndDate": "9999-12-31T00:00:00-0700",
          "owner": {
            "recordId": "0400864aa0bf1015796a9cbbf007fea",
            "name": "NAME_VALUE",
            "externalType": "ACCOUNT",
            "links": [
              {
                "rel": "canonical",
                "href": "https://IM_REST_API_HOST/km/api/latest/users/0400864aa0bf1015796a9cbbf007fea",
                "mediaType": "application/json, application/xml",
                "method": "GET"
              }
            ]
          },
          "lastModifier": {
            "recordId": "0400864aa0bf1015796a9cbbf007fea",
            "name": "NAME_VALUE",
            "externalType": "ACCOUNT",
            "links": [
              {
                "rel": "canonical",
                "href": "https://IM_REST_API_HOST/km/api/latest/users/0400864aa0bf1015796a9cbbf007fea",
                "mediaType": "application/json, application/xml",
                "method": "GET"
              }
            ]
          },
          "creator": {
            "recordId": "0400864aa0bf1015796a9cbbf007fea",
            "name": "NAME_VALUE",
            "externalType": "ACCOUNT",
            "links": [
              {
                "rel": "canonical",
                "href": "https://IM_REST_API_HOST/km/api/latest/users/0400864aa0bf1015796a9cbbf007fea",
                "mediaType": "application/json, application/xml",
                "method": "GET"
              }
            ]
          },
          "published": true,
          "publishDate": "2017-03-13T15:54:04-0600",
          "checkedOut": false,
          "publishedVersion": "1.0",
          "recordId": "0400864099b39f015ac8eb9e8b007fe6",
          "versionId": "0400864099b39f015ac8eb9e8b007fe7",
          "documentId": "FAQ225",
          "title": "3D touch not working",
          "version": "1.0",
          "answerId": 1000347,
          "locale": {
            "recordId": "en_US",
            "links": [
              {
                "rel": "canonical",
                "href": "https://IM_REST_API_HOST/km/api/latest/locales/en_US",
                "mediaType": "application/json, application/xml",
                "method": "GET"
              }
            ]
          },
          "dateModified": "2017-03-13T15:54:05-0600",
          "links": [
            {
              "rel": "canonical",
              "href": "https://IM_REST_API_HOST/km/api/latest/content/0400864099b39f015ac8eb9e8b007fe6",
              "mediaType": "application/json, application/xml",
              "method": "GET"
            },
            {
              "rel": "collection",
              "href": "https://IM_REST_API_HOST/km/api/latest/content",
              "mediaType": "application/json, application/xml",
              "method": "GET",
              "profile": "https://IM_REST_API_HOST/km/api/latest/metadata-catalog/content"
            }
          ]
        }
      ],
      "hasMore": false,
      "links": [
        {
          "rel": "canonical",
          "href": "https://IM_REST_API_HOST/km/api/latest/content/0400864099b39f015ac8eb9e8b007fe6/allTranslations?limit=20&offset=0",
          "mediaType": "application/json, application/xml",
          "method": "GET"
        }
      ],
      "count": 1
    }
    Back to Top