This web service provides information about the rating given to an unstructured document.
| Method | Endpoint |
|---|---|
GET |
|
| Path parameter | Type | Description |
|---|---|---|
{docId} |
String | Expects the id associated with the map. Users can get the id by listing documents or searching documents. |
- This web service is available to both authenticated and unauthenticated users with the
RATING_USERrole. - It is necessary to provide an
Ft-Calling-Appvalue when using Fluid Topics web services. See Fluid Topics calling app.
This web service requires authentication on portals with mandatory authentication.
Response body
The following lines show an example of a JSON response body:
{
"publication": {
"type": "STARS",
"rating": {
"date": "2022-10-27T07:32:11.765Z",
"type": "STARS",
"value": 4
}
}
}
| Field | Type | Description |
|---|---|---|
publication |
Object | Information about the document's rating. |
type |
String | The types of ratings an administrator has enabled for this document. Accepted values are STARS, LIKE, DICHOTOMOUS, and NO_RATING. |
rating |
Object | If the user rated the document, their most recent rating is returned. |
date |
String | The date when the user last rated the document. |
type |
String | The rating's type. May differ from the current rating type if the portal configuration changed since the last rating. Accepted values are STARS, LIKE, and DICHOTOMOUS. |
value |
Number | The rating's value. Rating values depend on rating types (STARS: 1 to 5, LIKE: 0 or 1, DICHOTOMOUS: 0 or 1). |
| Return code | Description |
|---|---|
200 OK |
The request is valid and returns data. |
401 UNAUTHORIZED |
The authorization header is absent or invalid and the portal's configuration does not allow unauthenticated users to rate content. |
403 FORBIDDEN |
The user or API key does not have the RATING_USER role. |
404 NOT FOUND |
No document exists with this identifier. |
For a comprehensive list of all possible return codes, see Return codes.