Get Wallboard Statistics


This request returns the values of the monitored parameters of a wallboard.

The definitions of the wallboard parameters are fetched with Get Wallboard Definitions.
The client will read the definitions first and then refresh the values repeatedly by retreiving this resource.

The agent statistics is returning all the agents that are/were connected to the wallboard line.
If the agent is a user, the field addressableOid is filled in. If the agent is a seperate phone, this is empty.
For user agents the user status and user busy state (calling of not) is also returned.

When the user status needs to be dynamicly updated every time the status changed it is recommened to process the websocket presence list events.
In these events you can see the addressableOid which can be matched to the addressableOid that is retrieved with this call.
This is recommended to prevent multiple API calls for fetching the actual user status.

An agent also has the field "connected". This field can be used to see if the agent is currently connected to the line (true) or if it were connected earlier (false).
When this value needs to be dynamicly updated every time the connected value is changed, the wallboard websocket events should be checked out to prevent polling.
This websocket event can also be used for dynamicly update the agent list if a new agent is added.

Resource

GET /wallboards/<OID>/stats

Where OID is the object ID of the wallboard.

Parameters

None

Payload

None

Context

Authorization

User

Errors

Example

Request
GET https://xelion.nl/api/v1/master/wallboard/1557879/stats
Response
{
  "object": {
    "id": "1557879",
    "accumulatedStatistics": [
      {
        "id": "ACTIVE_CALLS_INCOMING",
        "value": 1
      },
      {
        "id": "ACTIVE_CALLS_OUTGOING",
        "value": 0
      },
      {
        "id": "ACTIVE_CALLS_INCOMINGANDOUTGOING",
        "value": 1
      },
      {
        "id": "ANSWERED_CALLS",
        "value": 101
      },
      {
        "id": "AVERAGE_TALK_TIME_INCOMING",
        "value": 66
      },
      {
        "id": "AVERAGE_TALK_TIME_OUTGOING",
        "value": 8
      },
      {
        "id": "AVERAGE_TALK_TIME_INCOMINGANDOUTGOING",
        "value": 66
      },
      {
        "id": "AVERAGE_WAITING",
        "value": 7
      },
      {
        "id": "CANCELED_CALLS",
        "value": 1
      },
      {
        "id": "LONGEST_WAITING",
        "value": 89
      },
      {
        "id": "MISSED_CALLS",
        "value": 1
      },
      {
        "id": "TOTAL_CALLS_INCOMING",
        "value": 99
      },
      {
        "id": "TOTAL_CALLS_OUTGOING",
        "value": 1
      },
      {
        "id": "TOTAL_CALLS_INCOMINGANDOUTGOING",
        "value": 100
      },
      {
        "id": "WAITING_CALLS",
        "value": 0
      }
    ],
    "agentsStatistics": [
      {
        "id": "arnon",
        "name": "arnon",
        "addressableOid": "1650975",
        "status": "available",
        "busy": false,
        "totalCallDuration": 0,
        "numCalls": 0,
        "totalInboundCallDuration": 9309,
        "numInboundCalls": 1,
        "totalOutboundCallDuration": 0,
        "numOutboundCalls": 0,
        "averageCallTime": "3"
        "activeCalls": 0,
        "connected": true
      },
      {
        "id": "sander",
        "name": "sander",
        "addressableOid": "1895475",
        "status": "available",
        "busy": false,
        "totalCallDuration": 3275220,
        "numCalls": 49,
        "totalInboundCallDuration": 5309,
        "numInboundCalls": 1,
        "totalOutboundCallDuration": 0,
        "numOutboundCalls": 0,
        "averageCallTime": "3"
        "activeCalls": 0,
        "connected": true
      },
      {
        "id": "yealink1",
        "name": "yealink1",
        "totalCallDuration": 3832000,
        "numCalls": 50,
        "totalInboundCallDuration": 3309,
        "numInboundCalls": 1,
        "totalOutboundCallDuration": 0,
        "numOutboundCalls": 0,
        "averageCallTime": "3",
        "activeCalls": 1,
        "oldestCallStartTime": "2016-11-30 12:27:44",
        "connected": true
      }
    ]
  },
  "links": [
    {
      "rel": "self",
      "href": "http://localhost:8080/api/v1/master/wallboards/1557879/stats",
      "method": "GET"
    },
    {
      "rel": "refresh",
      "href": "http://localhost:8080/api/v1/master/wallboards/1557879/stats",
      "method": "GET"
    }
  ]
}