Retrieve the points ranking

GET/reports/rankings

Returns the same points ranking as the gamification ranking endpoint. Either the reports.read or the rankings.read permission grants access.

Results are limited to the products and users accessible with the current credentials. Each entry includes the user's name and avatar only when the credentials also have the users.read permission.

AuthorizationBearer <token>

Autonomous mode: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.

In: header

Query Parameters

period?string

Value in

  • "all"
  • "today"
  • "last_7_days"
  • "last_30_days"
  • "custom"
from?string

Required when period is custom.

Formatdate
to?string

Required when period is custom.

Formatdate
product_id?array<string>
limit?integer
Range1 <= value <= 100

Header Parameters

X-Client-Request-Id?string

Optional client-generated identifier of the request, up to 64 characters from [A-Za-z0-9._-]. Echoed back in the response and recorded in the request log; it never replaces the server-generated X-Request-Id.

Lengthlength <= 64

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/reports/rankings"
{  "data": {    "cache_ttl_seconds": 0,    "entries": [      {        "points": 0,        "position": 0,        "user": {          "avatar": "string",          "name": "string"        },        "user_id": "string"      }    ],    "generated_at": "2019-08-24T14:15:22Z",    "object": "ranking",    "period": {      "from": "2019-08-24T14:15:22Z",      "kind": "all",      "to": "2019-08-24T14:15:22Z"    },    "scope": {      "product_ids": [        "string"      ]    },    "summary": {      "participants": 0,      "total_points": 0    }  }}