These docs are for v0.0.1. Click to read the latest docs for v1.0.63.

Discussions

Ask a Question
Back to all

Get analytics with Realtime API

Hello, I'm trying to create a subscription to get realtime data using the ANALYTICS family, but always the susbscription status is PENDING. Using the AGENT-ENGAGEMENT family works correctly. The response of the request when creating the subscription is this:

{
"pagination": {
"pageNumber": 1,
"pageSize": 10,
"total": 1
},
"subscriptions": [
{
"family": "ANALYTICS",
"events": [
"ALL"
],
"transport": {
"type": "WEBSOCKET",
"endpoint": "wss://eu.cc.avayacloud.com/ws/notification/v1/analytics/realtime/ABCDEF/088f4863-983a-4d22-944b-ebcb35fe816c",
"authTokenHeader": "auth-token",
"pingInterval": 300
},
"extensions": {
"measureProducerId": "Agent_itd_1.0.0",
"processorType": "ITD"
},
"subscriptionId": "088f4863-983a-4d22-944b-ebcb35fe816c",
"createdAt": "2025-07-22T10:53:28.879688324Z",
"expiresAt": "2025-07-22T11:08:22.879688324Z",
"expiresIn": 421,
"status": "PENDING"
}
],
"links": {
"prev": "",
"next": ""
}
}

As the subscription is not in ACTIVE state, the answer when connecting to WebSocket is this:
{"event":"AUTHENTICATION_RESPONSE","status":"CONNECTION_FAILED_UNKNOWN_SUBSCRIPTION"}

In the documentation I have not found examples explaining how to obtain data from the ANALYTICS family, only from AGENT-ENGAGEMENT.