Get aqi by version ID

get

/km/api/v1/content/versions/{versionId}/aqi

This method returns the latest Article Quality Index (AQI) score of a given content version. If the content version doesn't have an AQI associated, it returns no content.

This API needs both the userToken and the integrationUserToken in kmauthtoken. The API user must have the required permissions to access the API. The account user (agent) must have the privilege to view the content. Web users can't access this API.

Response Errors

The possible error responses for this method are as follows:

  • OKDOM-GEN0001

    The error occurs when the specified versionId parameter is invalid.

  • OK-SEC0001

    The error occurs when:

    • The user(coach) does not have the view privileges for the article.
    • The user(coach) is not an Account user.

  • OK-GEN0026

    This error occurs when API user does not have permission to access the requested API.

Example URIs

The example URIs for this method are as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/content/versions/{versionId}/aqi

    The request returns the latest ArticleQualityIndex object associated with the specified content version.

Request

Path Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ArticleQualityIndexKey
Type: object
Title: ArticleQualityIndexKey
Show Source
Nested Schema : UserKey
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
Show Source
Nested Schema : UserKey-allOf[1]
Type: object
Show Source
Back to Top

Examples

The following example shows how to find the latest AQI score of a given content version 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/versions/{versionId}/aqi"

Example of Request Header

The following shows an example of the request 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 shows an example of the response body in JSON format.

{
  "recordId" : "RECORDID_VALUE",
  "aqi" : "55",
  "comments" : "COMMENTS_VALUE",
  "dateAdded" : "149250275-05-03T01:32:10-0600",
  "coach" : {
    "recordId" : "RECORDID_VALUE",
    "name" : "NAME_VALUE",
    "email" : "EMAIL_VALUE",
    "externalId" : 1587554420000,
    "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}"
    } ]
  }
}
Back to Top