Get a List of Available Statistics
You can make a GET request to retrieve a list of all available statistics for a tenant.
Request
Sample Request
The request below retrieves a list of realtime tenant statistics:
curl GET https://api.cxengage.net/v1/tenants/<tenantId>/realtime-statistics/available
-u '<yourUsername>:<yourPassword>'
Request Parameters
The table below lists the parameters you can include in a request:
| Parameter | Required? | Type | Description |
|---|---|---|---|
| tenantId | yes | UUID | The tenant's unique identifier. |
Response
Sample Response
The request returns JSON structured like the example below. For demonstration purposes, this sample response shows only one statistic. When you make the request, the response returns a listing of all statistics.
{
"resourcesReadyCount": {
"name": "resources-ready-count",
"type": "count",
"userFriendlyName": "Count of Ready Resources",
"responseKeys": {
"count": "count"
},
"requiredFilters": [
"tenant-id"
],
"optionalFilters": [
"agent-id",
"session-id",
"allocation",
"reason-id",
"reason-list-id",
"direction"
]
},
...
Response Parameters
The response includes the following parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | The statistic's API name. Use this name when you query the API to retrieve the statistic's value. |
| type | string | The type of statistic such as time or count. |
| userFriendlyName | string | The name that is displayed, in most circumstances, for the statistic in CxEngage. |
| responseKeys | string | The aggregate functions available for the statistic and the unit that they're measured in. For example, for time statistics, you might see millis for milliseconds. |
| requiredFilters | object | Required parameters that you must include when you query the API for this statistic. For the Reporting API, the only required parameter is tenantID. |
| optionalFilters | object |
Optional parameters that you can include to filter the response for this statistic. See Tutorial: Using Optional Filters. |