You can use the Agent Status Incremental Export API to ingest agent status data to your database and create custom reports in a reporting tool like Looker.
All endpoints start with https://api.myplaylist.io. See other Agent Status API endpoints.
Endpoint
GET /zendesk/incremental/user_ statuses
Headers
X-API-Key: <<YOUR PLAYLIST API KEY>>
To retrieve your API key, see Generating your Playlist API Key.
Parameters
Parameter | Description |
start_time | Unix timestamp of the specific starting point you want to use for querying records. Leave blank to start from the beginning. |
cursor | Cursor pointer to use as the starting point for the next page. |
Example requests
curl https://api.myplaylist.io/zendesk/incremental/user_statuses?start_time=1567776000 \
-H "X-API-Key: <<YOUR PLAYLIST API KEY>>"
curl https://api.myplaylist.io/zendesk/incremental/user_statuses?cursor= MTYyNDIwMTgyMy45NzZ8fDE0NDczMj N8 \
-H "X-API-Key: <<YOUR PLAYLIST API KEY>>"
Response
Property | Description |
user_statuses | Array of user status objects. |
end_time | Latest ended_at timestamp in results. |
end_of_stream | true if response is the last page of stream. |
cursor | Cursor for the next page. |
next_page | URL to next page based on cursor. |
Notes
- Up to 3000 records per request.
- All results are sorted by ended_at (when the user changed their status to a different status) in ascending order.
- "id" is unique for each user status record.
- There may be duplicates in results, so make sure you ignore/deduplicate them by "id".
- All dates and times are in UTC.
Example response
{
"user_statuses": [
{
"id": 6887,
"user_id": 116625277472,
"status": "away",
"duration_in_seconds": 2345,
"updater_id": 116625277472,
"started_at": "2019-12-17T17:24:48.273Z",
"ended_at": "2019-12-17T18:03:53.168Z"
},
...
{
"id": 1447322,
"user_id": 378630388592,
"status": "out_of_office",
"duration_in_seconds": 74631,
"updater_id": 378630388592,
"started_at": "2021-06-19T18:26:32.922Z",
"ended_at": "2021-06-20T15:10:23.976Z"
}
],
"end_time": 1624201823.976,
"count": 330,
"end_of_stream": true,
"cursor": "MTYyNDIwMTgyMy45NzZ8fDE0NDczMj N8",
"next_page": "https://api.myplaylist.io/zendesk/incremental/user_ statuses?cursor= MTYyNDIwMTgyMy45NzZ8fDE0NDczMj N8"
}
Rate limits
- 10 requests per second
- 10,000 requests per day