Replace all categories

patch

/km/api/v1/contentRecommendations/{id}/categories

This method replaces the category relationship of the specified ContentRecommendation object with the list of CategoryKey objects.

It is important to note that web users are not allowed to update a ContentRecommendation Object.

Request

Supported Media Types
Path Parameters
  • The unique identifier of the ContentRecommendation object
Body ()
The List of Category objects
Root Schema : List CategoryKey
Type: object
Title: List CategoryKey
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : CategoryKey
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
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
Back to Top

Response

204 Response

No Content.
Back to Top

Examples

The following example shows how to replace the category relationship of the specified ContentRecommendation object with the list of CategoryKey objects.

curl -X "PATCH" "http://localhost:7001/km/api/latest/tasks/contentRecommendations/{id}/categories"

Example of Response Header

The following shows an example of the response header.

-H "kmauthtoken: {\"siteName\":\"ORACLE_KNOWLEDGE\",\"integrationUserToken\":\"\"+eCJYkxKwj5HUaIiJYun0/TpatwT1LmtcsF05W33xnEojifV/AsLDj9RpN0lKuorTMNKeSE1tgC7svVL+BzntqDON4KiM1HFlpxvXEUCB0P2w0Xrs75McygqxdVaDSE9",\"userToken\":\"UoyWTKRG4RpyJCH4Wqjzht2iYUrsDdk5ir+3IpwEkxcwajJkGR9OGSQBTANQVGW0iVT9MFeDzqL+RYdgfzGSK+h5QzDFIDM+rDLgdKeEE19ljWFm3zMCF+kgYp/dJ/Yq5V7Re+aDXqHg6YkHfvprFA==\"}" \
-H "Accept: application/json"

Example of Response Body

The following example shows the contents of the response body in JSON format:

{
  "items" : [ {
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "externalId" : 1428416790963,
    "externalType" : "EXTERNALTYPE_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://localhost:7002/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://localhost:7002/km/api/{version}/metadata-catalog/{resourceName}"
    }]
  }
}
Back to Top