/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.

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
}
Language
Authorization
Header
URL
Click Try It! to start a request and see the response here!