Find by ID
/km/api/v1/contentRecommendations/{id}
If active user have valid views then this method returns the ContentRecommendation object with the specified ID parameter.
Account user can see a ContentRecommendation if he contains atleast one matching ContentRecommendation views.
Contact user can see a ContentRecommendation if he has originally requested that ContentRecommendation.
Example URIs
The example URIs for this method are as follows:
http://<IM_REST_API_HOST>/km/api/latest/contentRecommendations/{id}
The request returns a ContentRecommendation object having the specified ID parameter.
http://<IM_REST_API_HOST>/km/api/latest/contentRecommendations/{Id} ?mode=FULL&contentState=LATESTVALID
The method returns a ContentRecommendation object, having the specified ID parameter, in FULL mode. ContentKey objects appear nested within the resource for the latest valid version of the content.
This query is applicable only with the PUBLISHED and LATESTVALID values.
Response Errors
The possible error responses for this method are as follows:
- OKDOM-GEN0006
This error is displayed when you specify any invalid value as contentState parameter with the HTTP service request.
- OKDOM-CR0012
This error is displayed when active user does not contain valid views to access the recommendation
- OKDOM-CR0013
This error is displayed when active user is not creator of the recommendation
- OKDOM-CONT0121
This error is displayed when you specify LATEST as the contentState value along with the HTTP Service request.
The contentRecommendations resource does not allow the LATEST as contentState parameter value.
Request
-
id: string
The unique identifier of the object to be retrieved.
Response
- application/json
- application/xml
200 Response
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ContentRecommendationKey-allOf[1]
object
Singular Resource
object
-
recordId(optional):
string
The unique identifier of the contentRecommendation object.
object
-
caseNumber(optional):
string
The incidentId to locate contentRecommendation object associated with a specific incident.
-
comments(optional):
string
The comment from the user who recommended the content.
-
completedByUserId(optional):
string
The userId associated with the completed content recommendations.
To have a completedByUserId, the ContentRecommendation object must have status values as follows:
- CONTENT_CREATED
- CONTENT_MODIFIED
- REJECTED_DUPLICATE
- REJECTED_NOT_ENOUGH_INFO
- REJECTED_UNSUITABLE
- REJECTED_OTHER
-
completedByUserName(optional):
string
The unique identifier of the user who added content recommendation.
-
dateAdded(optional):
string(date-time)
The date when the ContentRecommendation object was added.
-
dateModified(optional):
string(date-time)
The date when the ContentRecommendation object was last modified.
-
localizedPriority(optional):
string
The localized priority for the recommendation.
-
localizedStatus(optional):
string
The localized status of the recommendation.
-
priority(optional):
Allowed Values:
[ "LOW", "MEDIUM", "HIGH" ]
The optional priority for the recommendation. The valid values are: LOW, MEDIUM, and HIGH.
-
requestedByUserId(optional):
string
The unique identifier of the user who recommended the content.
-
requestedByUserName(optional):
string
The name of user who requested the content.
-
status(optional):
Allowed Values:
[ "NEW", "UNDER_REVIEW", "REJECTED_DUPLICATE", "REJECTED_NOT_ENOUGH_INFO", "REJECTED_UNSUITABLE", "REJECTED_OTHER", "CONTENT_CREATED", "CONTENT_MODIFIED" ]
The status of the recommendation.
The valid status values are the following:
- NEW
- CONTENT_CREATED
- CONTENT_MODIFIED
- REJECTED_DUPLICATE
- REJECTED_NOT_ENOUGH_INFO
- REJECTED_UNSUITABLE
- REJECTED_OTHER
-
statusComments(optional):
string
The comment added by author about the status of the ContentRecommendation object.
-
title(optional):
string
The title assigned to the recommendation by the user.
object
-
categories(optional):
array categories
The list of content categories to which the recommendation is associated.
-
content(optional):
ContentKey
-
contentType(optional):
ContentTypeKey
-
locale(optional):
LocaleKey
-
views(optional):
array views
The list of views to which the recommendation is associated.
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.
array
The list of content categories to which the recommendation is associated.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ContentKey-allOf[1]
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ContentTypeKey-allOf[1]
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
LocaleKey-allOf[1]
array
The list of views to which the recommendation is associated.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
CategoryKey-allOf[1]
object
-
childrenCount(optional):
integer
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(optional):
string
Description of the Category object
-
externalId(optional):
integer
The unique identifier used while integrating the repository data with the external system.
-
externalType(optional):
string
The type of the category used while integrating the repository data with the external system. Valid options are PRODUCT and CATEGORY.
-
name(optional):
string
The name of the category.
-
objectId(optional):
string
The hierarchichal position of the category
-
parents(optional):
array 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
-
recordId(optional):
string
The unique record ID of the Category object.
-
referenceKey(optional):
string
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.
-
responseLocale(optional):
string
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.
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
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.
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
-
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.
object
-
recordId(optional):
string
The unique identifier of the Locale object.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ViewKey-allOf[1]
object
-
name(optional):
string
Localized name of the view
-
recordId(optional):
string
GUID of the SITE table containing the view definition
-
referenceKey(optional):
string
Non localized reference key for the view
Examples
The following example shows how to find the Content Recommendation object with the specified ID parameter 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/contentRecommendations/{id}"
Example of Request Header
The following shows an example of the request header.
Content-Type: -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.
Content-Type: { "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}" } ] }, "content" : { "versionId" : "VERSIONID_VALUE", "documentId" : "DOCUMENTID_VALUE", "title" : "TITLE_VALUE", "version" : "VERSION_VALUE", "answerId" : 0, "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}" } ] }, "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}" } ] }, "views" : [ { "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}" } ] } ], "categories" : [ { "referenceKey" : "REFERENCEKEY_VALUE", "name" : "NAME_VALUE", "externalId" : 1428416791401, "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}" } ] } ], "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}" } ], "caseNumber" : "CASENUMBER_VALUE", "comments" : "COMMENTS_VALUE", "completedByUserId" : "COMPLETEDBYUSERID_VALUE", "completedByUserName" : "COMPLETEDBYUSERNAME_VALUE", "dateAdded" : "2013-04-23T21:06:35EDT", "dateModified" : "2013-04-23T21:06:35EDT", "requestedByUserId" : "REQUESTEDBYUSERID_VALUE", "requestedByUserName" : "REQUESTEDBYUSERNAME_VALUE", "statusComments" : "STATUSCOMMENTS_VALUE", "title" : "TITLE_VALUE" }