Get rating results

get

/km/api/v1/content/{id}/ratings

This method returns a list of all the ratings results for a content record.

Example URIs

Following are the example URIs for this method:

  • http://<IM_REST_API_HOST>/km/api/latest/content/{id}/ratings

    The request returns a paginated list of all the ratings results for a content record sorted by date added in ascending order.

  • http://<IM_REST_API_HOST>/km/api/latest /content/{id}/ratings?orderBy=dateAdded:desc

    The request returns a paginated list of all the ratings results for a content record sorted by date added in descending order. The fields that you can sort are recordId, dateAdded, and dateModified.

Request

Path Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ResultList DataFormResults
Type: object
Title: ResultList DataFormResults
Match All
Show Source
Nested Schema : Collection Paging Resource
Title: Collection Paging Resource
Oracle base collection resource schema definition.
Match All
Show Source
Nested Schema : Base Collection Resource
Title: Base Collection Resource
Oracle base collection resource schema definition.
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
Show Source
Nested Schema : Base Collection Resource-allOf[1]
Type: object
Show Source
Nested Schema : Collection Paging Resource-allOf[1]
Type: object
Show Source
Nested Schema : ResultList DataFormResults-allOf[1]
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: object
Nested Schema : items
Type: array
Show Source
Nested Schema : DataFormResults
Match All
Show Source
Nested Schema : DataFormResultsData
Match All
Show Source
Nested Schema : DataFormResultsKey
Match All
Show Source
Nested Schema : DataFormResultsKey-allOf[1]
Type: object
Show Source
Nested Schema : DataFormResultsData-allOf[1]
Type: object
Show Source
Nested Schema : DataFormResults-allOf[1]
Type: object
Show Source
Nested Schema : LocaleKey
Match All
Show Source
Nested Schema : questions
Type: array
To Many Relationship to DetailQuestionResult
Show Source
Nested Schema : UserKey
Match All
Show Source
Nested Schema : LocaleKey-allOf[1]
Type: object
Show Source
Nested Schema : DetailQuestionResult
Match All
Show Source
Nested Schema : DetailQuestionResultKey
Type: object
Title: DetailQuestionResultKey
Show Source
  • The unique record ID of the DetailQuestionResult object.
  • The reference key for the DetailQuestionResult object. DetailQuestionResult objects support multiple languages. This field can be used to identify the associated objects for all languages.
Nested Schema : DetailQuestionResult-allOf[1]
Type: object
Show Source
Nested Schema : answers
Type: array
To Many Relationship to DetailAnswerResult
Show Source
Nested Schema : DetailAnswerResult
Match All
Show Source
Nested Schema : DetailAnswerResultKey
Type: object
Title: DetailAnswerResultKey
Show Source
  • The unique record ID of the DetailAnswerResult object.
  • The reference key for the DetailAnswerResult object. DetailAnswerResult objects support multiple languages. This field can be used to identify the associated objects for all languages.
Nested Schema : DetailAnswerResult-allOf[1]
Type: object
Show Source
Nested Schema : UserKey-allOf[1]
Type: object
Show Source
Back to Top

Examples

The following example shows how to find all ratings results for a Content record 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/content/{id}/ratings"

Example of Request Header

The following shows an example of the request header.

-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.

{
  "items" : [ {
    "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}"
      } ]
    },
    "questions" : [ {
      "answers" : [ {
        "text" : "TEXT_VALUE",
        "value" : -1895849025,
        "referenceKey" : "REFERENCEKEY_VALUE"
      } ],
      "referenceKey" : "REFERENCEKEY_VALUE"
    } ],
    "user" : {
      "name" : "NAME_VALUE",
      "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"
    } ],
    "dateAdded" : "2013-04-30T21:34:23EDT",
    "dateModified" : "2013-04-30T21:34:23EDT"
  } ],
  "hasMore" : false,
  "limit" : 20,
  "offset" : 0,
  "count" : 1
}
Back to Top