Find by ID

get

/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

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

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ContentRecommendation
Match All
Show Source
Nested Schema : ContentRecommendationData
Match All
Show Source
Nested Schema : ContentRecommendationKey
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
Show Source
Nested Schema : ContentRecommendationKey-allOf[1]
Type: object
Show Source
Nested Schema : ContentRecommendationData-allOf[1]
Type: object
Show Source
Nested Schema : ContentRecommendation-allOf[1]
Type: object
Show Source
Nested Schema : categories
Type: array

The list of content categories to which the recommendation is associated.

Show Source
Nested Schema : ContentKey
Match All
Show Source
Nested Schema : ContentTypeKey
Match All
Show Source
Nested Schema : LocaleKey
Match All
Show Source
Nested Schema : views
Type: array

The list of views to which the recommendation is associated.

Show Source
Nested Schema : CategoryKey
Match All
Show Source
Nested Schema : CategoryKey-allOf[1]
Type: object
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 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 : ContentKey-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 : 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.

Nested Schema : LocaleKey-allOf[1]
Type: object
Show Source
Nested Schema : ViewKey
Match All
Show Source
Nested Schema : ViewKey-allOf[1]
Type: object
Show Source
Back to Top

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"
}
Back to Top