Replace all views
/km/api/v1/contentRecommendations/{id}/views
This method replaces the view relationship of the specified ContentRecommendation object with the list of View objects.
Please refer to the rules regarding updating views for a ContentType-associated recommendation in the UPDATE service documentation. The same rules apply to this service.
Also, It is important to note that web users are not allowed to update a ContentRecommendation Object.
Request
- application/json
- application/xml
-
id: string
The unique identifier of the ContentRecommendation object
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ViewKey-allOf[1]
object
Singular Resource
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
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.
Response
204 Response
Examples
The following example shows how to replace the view relationship of the specified ContentRecommendation object with the list of View objects.
curl -X "PATCH" "http://localhost:7001/km/api/latest/tasks/contentRecommendations/{id}/views"
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", "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}" } ] } ] }