This web service provides information about the rating given to a map and its topics.
Method | Endpoint |
---|---|
GET |
|
Path parameter | Type | Description |
---|---|---|
{mapId} |
String | Expects the id associated with the map. Users can get the id by listing maps or searching maps. |
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
}
},
"topics": {
"type": "STARS",
"ratings": [
{
"tocId": "4eHHtKjgb6ckuKrHArbCgQ",
"date": "2022-11-02T15:28:11.765Z",
"type": "STARS",
"value": 1
}
]
}
}
Field | Type | Description |
---|---|---|
publication |
Object | Information about the map's rating. |
type |
String | The types of ratings an administrator has enabled for this map. Accepted values are STARS , LIKE , DICHOTOMOUS , and NO_RATING . |
rating |
Object | If the user rated the map, their most recent rating is returned. |
date |
String | The date when the user last rated the map. |
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). |
topics |
Object | Information about the topics and their ratings. |
type |
String | The types of ratings an administrator has enabled for the map's topics. Accepted values are STARS , LIKE , DICHOTOMOUS , and NO_RATING . |
ratings |
Object | An array of topic ratings for the map. Can be empty. |
tocId |
String | The topic's identifier based on its position in the table of contents. |
date |
String | The date when the user last rated the topic. |
type |
String | The rating's type. May differ from the current rating type if the portal configuration changed since 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 map exists with this identifier. |
Tip
For a comprehensive list of all possible return codes, see Return codes.