Rate content
post
/km/api/v1/content/{id}/rate
This method rates the latest valid version of the Content object with the specified ID.
The latest valid version of the Content object is either the published live or the latest version of the Content object. The request payload and the URI for the new resource must be specified along with the POST method.
Note: The content owner cannot rate the content.
Response Errors
The possible error response for this method is as follows:
- OKDOM-GEN0001
The error occurs when the specified ID is invalid.
Request
Supported Media Types
- application/json
- application/xml
Path Parameters
-
id: string
The content identifier.
The single answer rating request payload should include the survey question answer's recordId and could optionally include the survey's recordId (retrieved via /dataForms/{id}), the locale's recordId and the answerComment element.
Root Schema : SingleAnswerRating
Type:
object
Title:
Show Source
SingleAnswerRating
-
answer(optional):
object DataFormAnswerKey
Title:
DataFormAnswerKey
-
answerComment(optional):
string
Comment for the rating
-
dateAdded(optional):
string(date-time)
The dateAdded for the replacement token for this locale
-
locale(optional):
object LocaleKey
Title:
LocaleKey
-
recordId(optional):
string
The unique record ID of the SingleAnswerRating object.
-
survey(optional):
object DataFormKey
Title:
DataFormKey
-
user(optional):
object UserKey
Title:
UserKey
Nested Schema : DataFormAnswerKey
Type:
object
Title:
Show Source
DataFormAnswerKey
-
links(optional):
array links
-
recordId(optional):
string
The unique record ID of the DataFormAnswer object.
-
referenceKey(optional):
string
The reference key for the DataFormAnswer object. DataFormAnswer objects support multiple languages. This field can be used to identify the associated objects for all languages.
Nested Schema : LocaleKey
Type:
object
Title:
Show Source
LocaleKey
-
links(optional):
array links
-
recordId(optional):
string
The unique identifier of the Locale object.
Nested Schema : DataFormKey
Type:
object
Title:
Show Source
DataFormKey
-
links(optional):
array links
-
recordId(optional):
string
The unique record ID of the DataForm object.
-
referenceKey(optional):
string
The reference key for the DataForm object. DataForm objects support multiple languages. This field can be used to identify the associated objects for all languages.
Nested Schema : UserKey
Type:
object
Title:
Show Source
UserKey
-
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.
-
links(optional):
array links
-
name(optional):
string
User's full name
-
recordId(optional):
string
The unique record ID of the User object.
Nested Schema : links
Type:
Show Source
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Nested Schema : instanceLink
Type:
object
Metadata describing link description objects that MAY appear in the JSON instance representation.
Show Source
-
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.
Nested Schema : links
Type:
Show Source
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Nested Schema : links
Type:
Show Source
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Nested Schema : links
Type:
Show Source
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Response
204 Response
No Content.