Find all translations by content ID

get

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

The request 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.
The URL parameter, 'contentState', will be ignored.
This service is not available to contact(web) users. To allow contact users to access the service, You have to pass a query parameter additionalFields with value 'allowWebUserAccess'

Content Security

A web user or Oracle B2C Service Knowledge Advanced contact user can access the content in the following conditions:

  • The UserGroups assigned to the user match with at least one of the UserGroups assigned to the content.
  • All the content records that do not have any UserGroups assigned to them are available to all users.

When a user requests the content record in the EXTENDED or FULL mode, the service returns the content's XML after removing the schema attributes and conditional sections that are secured by UserGroups, which are not accessible to the user.

An Information Manager Console user or an Oracle B2C Service account 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.

NOTE: If the customer is using Oracle B2C Service and if the kmauthtoken header contains an Interface ID value and neither isForEdit nor agentMode is true, then the service returns only documents that are mapped to the interface ID value. The interface ID in the API session token overrides any interfaceId parameter value given with the HTTP request.

Response Errors

The possible error responses for this method are as follows:

  • OKDOM-GEN0001

    The error occurs in any of the following cases:

    • No content is found by the specified Answer ID.
    • The user is using Oracle B2C Service, and the kmauthtoken header contains an interface ID for which no interface is found.
    • The interface ID given with the interfaceId parameter is invalid.
  • OK-GEN0020

    The error occurs in any of the following cases:

    • The mode or langpref request parameter is specified with the HTTP request.
    • The isForEdit request parameter value is specified as true.
  • OK-RN_INTERFACE0001

    The error occurs when either of the following conditions exist:

    • The user is using Oracle B2C Service, and the kmauthtoken header contains an interface ID for which no view has been mapped.
    • No view has been mapped to the interface passed as the interface ID request parameter.
  • OKDOM-SEC0003

    The error occurs when contact user tries to access the service.

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 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
Match All
Show Source
Nested Schema : Collection Paging Resource
Title: Collection Paging Resource
Oracle base collection resource schema definition.
Match All
Show Source
Nested Schema : Base Collection Resource
Title: Base Collection Resource
Oracle base collection resource schema definition.
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
Show Source
Nested Schema : Base Collection Resource-allOf[1]
Type: object
Show Source
Nested Schema : Collection Paging Resource-allOf[1]
Type: object
Show Source
Nested Schema : ResultList ContentData-allOf[1]
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: object
Nested Schema : items
Type: array
Show Source
Nested Schema : ContentData
Match All
Show Source
Nested Schema : ContentKey
Match All
Show Source
Nested Schema : ContentKey-allOf[1]
Type: object
Show Source
Nested Schema : ContentData-allOf[1]
Type: object
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 : LocaleKey
Match All
Show Source
Nested Schema : LocaleKey-allOf[1]
Type: object
Show Source
Nested Schema : UserKey
Match All
Show Source
Nested Schema : ContentTypeKey
Match All
Show Source
Nested Schema : UserKey-allOf[1]
Type: object
Show Source
Nested Schema : ContentTypeKey-allOf[1]
Type: object
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.

  • 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.

Back to Top

Examples

The following example shows how to find all available translations of the document that has the specified content ID and the master document by submitting a get request on the REST resource using cURL.

cURL Command

Command: curl -X "GET" "http://<IM_REST_API_HOST>/km/api/latest/content/{id}/allTranslations"

Example of Request Header

The following shows an example of the request header.

-H "kmauthtoken: {\"siteName\":\"ORACLE_KNOWLEDGE\",\"integrationUserToken\":\"\"+eCJYkxKwj5HUaIiJYun0/TpatwT1LmtcsF05W33xnEojifV/AsLDj9RpN0lKuorTMNKeSE1tgC7svVL+BzntqDON4KiM1HFlpxvXEUCB0P2w0Xrs75McygqxdVaDSE9"}" \
-H "Accept: application/json"

Example of Response Body

The following shows an example of the response body in JSON format.

{
  "items" : [ {
    "contentType" : {
      "referenceKey" : "REFERENCEKEY_VALUE",
      "name" : "NAME_VALUE",
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "priority" : "PRIORITY_5",
    "createDate" : "2013-04-23T21:06:27EDT",
    "dateAdded" : "2013-04-23T21:06:27EDT",
    "dateModified" : "2013-04-23T21:06:27EDT",
    "displayStartDate" : "2013-04-23T21:06:27EDT",
    "displayEndDate" : "2013-04-23T21:06:27EDT",
    "eventStartDate" : "2013-04-23T21:06:27EDT",
    "eventEndDate" : "2013-04-23T21:06:27EDT",
    "owner" : {
      "name" : "NAME_VALUE",
      "externalId" : 1428416792007,
      "externalType" : "EXTERNALTYPE_VALUE",
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "lastModifier" : {
      "name" : "NAME_VALUE",
      "externalId" : 1428416792014,
      "externalType" : "EXTERNALTYPE_VALUE",
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "creator" : {
      "name" : "NAME_VALUE",
      "externalId" : 1428416792017,
      "externalType" : "EXTERNALTYPE_VALUE",
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "published" : true,
    "publishDate" : "2013-04-23T21:06:27EDT",
    "displayReviewDate" : "25057028-02-17T22:12:46EST",
    "checkedOut" : true,
    "checkedOutBy" : {
      "name" : "NAME_VALUE",
      "externalId" : 1428416792010,
      "externalType" : "EXTERNALTYPE_VALUE",
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "basedOnVersion" : "BASEDONVERSION_VALUE",
    "publishedVersion" : "PUBLISHEDVERSION_VALUE",
    "basedLocale" : {
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "displayPosition" : "FIXED_AT_TOP",
    "versionId" : "VERSIONID_VALUE",
    "documentId" : "DOCUMENTID_VALUE",
    "title" : "TITLE_VALUE",
    "version" : "VERSION_VALUE",
    "answerId" : 1428416792011,
    "locale" : {
      "links" : [ {
        "rel" : "canonical",
        "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
        "mediaType" : "application/json, application/xml",
        "templated" : true,
        "method" : "GET",
        "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
      } ]
    },
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  } ],
  "hasMore" : false,
  "limit" : 20,
  "offset" : 0,
  "links" : [ {
    "rel" : "canonical",
    "href" : "http://<IM_REST_API_HOST>/km/api/{version}/content?limit=20&offset=0",
    "mediaType" : "application/json, application/xml",
    "method" : "GET"
  } ],
  "count" : 1
}
Back to Top