/reporting/api/v1/agent/workstate/rollup

This endpoint will return the amount of time (in seconds) for all workstates used by an agent, by individual Agent ID.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Agent Workstate Rollup from Reporting API

This endpoint will return the amount of time (in seconds) for all workstates used by an agent, by individual Agent ID.

Parameters

ParameterRequired?Description
queuesNoArray of QueueIds in integer format. If defined, only agent data for the specified queues will be returned.
agentsNoArray of AgentIds in integer format. If defined, only agent data for the specified agents will be returned.
startDateTimeYes - if relativePeriodStart is undefined.Datetime in ISO 8601 format ("YYYY-MM-DDThh:mm:ssZ", e.g. "2023-01-01T08:00:00Z").
endDateTimeYes - if relativePeriodEnd is undefinedDatetime in ISO 8601 format ("YYYY-MM-DDThh:mm:ssZ", e.g. "2023-01-01T08:00:00Z").
relativePeriodStartNoStart time using a count of periods defined by the resolution parameter. Must be a negative integer to indicate periods in the past.
relativePeriodEndNoEnd time using a count of periods defined by the resolution parameter. Must be a negative integer smaller than the relativePeriodStart value.
relativeTimezoneNoIf the resolution period is set to daily ('2') the Timezone parameter can be used to summarize data by the defined time zone. Allowed values are defined at this page on Time Zones.
resolutionYes - if relativePeriodStart is definedthe length of the time periods used for the relativePeriod parameters and the summarization of data returned. Set to 0 for quarter-hourly, 1 for hourly, and 2 for daily.
includeInactiveTimeNoThis parameter is assumed to be false if not defined. Setting to true will include agents with no logged in time during the specified date range.

Responses available:

  • 200
  • 401
  • 403

Example return:

{
  "resultCode": 0,
  "resultCodeName": "Success",
  "data": [
    {
      "StateIdDurations": [
        {
          "StateId": 0,
          "State": 3,
          "SubState": 0,
          "Duration": 537
        },
        {
          "StateId": 1,
          "State": 0,
          "SubState": 0,
          "Duration": 363
        }
      ],
      "TotalDuration": 900,
      "AgentId": 18605,
      "RollupDate": "2023-09-21T15:45:00Z"
    },
    {
      "StateIdDurations": [
        {
          "StateId": 1,
          "State": 0,
          "SubState": 0,
          "Duration": 900
        }
      ],
      "TotalDuration": 900,
      "AgentId": 18605,
      "RollupDate": "2023-09-21T16:00:00Z"
    },
    {
      "StateIdDurations": [
        {
          "StateId": 1,
          "State": 0,
          "SubState": 0,
          "Duration": 900
        }
      ],
      "TotalDuration": 900,
      "AgentId": 18605,
      "RollupDate": "2023-09-21T16:15:00Z"
    },
    {
      "StateIdDurations": [
        {
          "StateId": 1,
          "State": 0,
          "SubState": 0,
          "Duration": 900
        }
      ],
      "TotalDuration": 900,
      "AgentId": 18605,
      "RollupDate": "2023-09-21T16:30:00Z"
    },
    {
      "StateIdDurations": [
        {
          "StateId": 1,
          "State": 0,
          "SubState": 0,
          "Duration": 900
        }
      ],
      "TotalDuration": 900,
      "AgentId": 18605,
      "RollupDate": "2023-09-21T16:45:00Z"
    }
  ],
  "dataType": "JObject",
  "hasPaging": false
}
Body Params
queues
array of int32s | null
Defaults to null
queues
agents
array of int64s | null
Defaults to null
agents
date-time | null
Defaults to null
date-time | null
Defaults to null
int32 | null
Defaults to -2
int32 | null
Defaults to -1
string | null
Defaults to est
int32
enum

0=QuarterHour,1=Hour,2=Day

Allowed:
boolean
Defaults to false
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json-patch+json

Generated from available request content types

Allowed:
Responses

401

Unauthorized

403

Forbidden

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json