Find all translations by content ID
/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
-
id: string
The content Id of the content
Response
- application/json
- application/xml
200 Response
object
ResultList ContentData
-
allOf
Collection Paging Resource
Title:
Collection Paging Resource
Oracle base collection resource schema definition. -
object
ResultList ContentData-allOf[1]
Collection Paging Resource
-
allOf
Base Collection Resource
Title:
Base Collection Resource
Oracle base collection resource schema definition. -
object
Collection Paging Resource-allOf[1]
Base Collection Resource
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
Base Collection Resource-allOf[1]
object
Singular Resource
object
-
count(optional):
integer
Number of resource instances returned in the current range.
-
hasMore(optional):
boolean
Boolean value that is set to true if more resources are available on the server than the subset returned in current page.
-
limit(optional):
integer
Actual paging size used by the server.
-
offset(optional):
integer
Offset value used in the current page.
-
totalResults(optional):
integer
Total count of the resource instances, including both the instances in the current range and the instances on the server that satisfy the request.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
object
-
href:
string
URI [RFC3986] or URI Template [RFC6570]. If the value is set to URI Template, then the "templated" property must be set to true.
-
mediaType(optional):
string
Media type, as defined by RFC 2046, describing the link target.
-
method(optional):
string
HTTP method for requesting the target of the link.
-
profile(optional):
string
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource..
-
rel:
string
Name of the link relation that, in addition to the type property, can be used to retrieve link details. For example, href or profile.
-
templated(optional):
boolean
Boolean flag that specifies that "href" property is a URI or URI Template. If the property is a URI template, set this value to true. By default, this value is false.
object
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ContentKey-allOf[1]
object
-
allTranslations(optional):
array allTranslations
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.
-
answerId(optional):
integer
The unique identifier that enables mapping between an answer and the content.
-
dateModified(optional):
string(date-time)
The date when the content was last modified in the Oracle Knowledge Repository.
-
documentId(optional):
string
The unique identifier of a document that indicates the content type in which the content is saved.
-
locale(optional):
LocaleKey
-
recordId(optional):
string
The unique identifier of the document. This ID is same in all versions in all locales of the document.
-
title(optional):
string
The tittle of the document.
-
version(optional):
string
Version of the Content object
-
versionId(optional):
string
The unique identifier of the specific version of a document in a specific locale. You cannot use this field in queries made using q query parameter.
object
-
basedLocale(optional):
LocaleKey
-
basedOnVersion(optional):
string
Version of the Content object
-
checkedOut(optional):
boolean
The date when an author has checked out or locked the document for editing.
-
checkedOutBy(optional):
UserKey
-
contentType(optional):
ContentTypeKey
-
createDate(optional):
string(date-time)
The date when the content was created. For legacy systems, the create date is the date when the document was created in those systems.
-
creator(optional):
UserKey
-
dateAdded(optional):
string(date-time)
The date when the content was added to the content type. For legacy systems, the create date is the date when the document was migrated from the legacy system to the Oracle Knowledge Repository.
-
displayEndDate(optional):
string(date-time)
The date when the service stops the display of the document to the end users.
-
displayPosition(optional):
Allowed Values:
[ "FIXED_AT_TOP", "PLACE_AT_TOP", "HISTORICAL_USEFULNESS" ]
LookUp code that can be Fixed@Top, Place@Top , Historical Usefulness -
displayReviewDate(optional):
string(date-time)
The date when the document requires a review by an author capable of performing the review.
-
displayStartDate(optional):
string(date-time)
The date when the document will be available to display to end-users.
-
eventEndDate(optional):
string(date-time)
The date when the document's event ends.
-
eventStartDate(optional):
string(date-time)
The date when the document's event begins.
-
lastModifiedDate(optional):
string(date-time)
The date when the content was last modified. For legacy systems, the lastModifiedDate date is the date when the document was last modified in those systems.
-
lastModifier(optional):
UserKey
-
owner(optional):
UserKey
-
pending(optional):
boolean
The flag that indicates whether the document is pending for publication.
-
priority(optional):
Allowed Values:
[ "PRIORITY_0", "PRIORITY_1", "PRIORITY_2", "PRIORITY_3", "PRIORITY_4", "PRIORITY_5", "PRIORITY_6", "PRIORITY_7", "PRIORITY_8", "PRIORITY_9", "PRIORITY_10", "PRIORITY_11", "PRIORITY_12", "PRIORITY_13", "PRIORITY_14", "PRIORITY_15", "PRIORITY_16", "PRIORITY_17", "PRIORITY_18", "PRIORITY_19", "PRIORITY_20" ]
The priority assigned to the content.
The valid values are: PRIORITY_0 to PRIORITY_20. For example, PRIORITY_1 or PRIORITY_18 are valid values, but PRIORITY_21 is not.
-
publishDate(optional):
string(date-time)
The date when the document was first displayed to end users.
-
published(optional):
boolean
The flag that indicates whether the document is published.
-
publishedVersion(optional):
string
Version of the Content object
-
suppressNotification(optional):
boolean
The flag that indicates whether the document's subscription notification is suppressed.
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.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
LocaleKey-allOf[1]
object
-
recordId(optional):
string
The unique identifier of the Locale object.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
UserKey-allOf[1]
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ContentTypeKey-allOf[1]
object
-
email(optional):
string
Email of the User object
-
externalId(optional):
integer
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.
-
externalType(optional):
string
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.
-
name(optional):
string
User's full name
-
recordId(optional):
string
The unique record ID of the User object.
object
-
description(optional):
string
The description for the ContentType object. Content Types support multiple languages.
This field identifies the object associated with the language specified by the user.
-
name(optional):
string
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.
-
recordId(optional):
string
The unique identifier of the ContentType object.
-
referenceKey(optional):
string
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.
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 }