Get aqi by version ID
/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
-
versionId: string
The content version identifier
Response
- application/json
- application/xml
200 Response
object
ArticleQualityIndexKey
-
aqi(optional):
string
The AQI score of the version of a document.
-
coach(optional):
UserKey
-
comments(optional):
string
The comments added with AQI score.
-
dateAdded(optional):
string(date-time)
The date when the ArticleQualityIndex object was created.
-
recordId(optional):
string
The unique identifier of the ArticleQualityIndex object.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
UserKey-allOf[1]
object
Singular Resource
object
-
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.
-
name(optional):
string
User's full name
-
recordId(optional):
string
The unique record ID of the User object.
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.
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}" } ] } }