Escalation Dashboard

List raw availability events (paginated)

GET
/api/escalation-dashboard/availability-events

Returns the raw AgentAvailabilityEvent stream (connection / availability / capacity transitions) within a time window, optionally filtered by user, category, value, and source. Used to back the audit / drill-down view on the escalation dashboard.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

departmentId?string

Optional department filter. ADMIN/SUPERADMIN may pass any departmentId; DEPARTMENT_HEAD is implicitly scoped to their own department and any other value is ignored.

userId?string
start?string

ISO-8601 start of the window. Defaults to end - 24h.

Formatdate-time
end?string

ISO-8601 end of the window. Defaults to now.

Formatdate-time
page?integer

1-based page number.

Range1 <= value
Default1
limit?integer

Page size. Clamped to [1, 200].

Range1 <= value <= 200
Default50
category?string

Value in

  • "connection"
  • "availability"
  • "capacity"
value?string

Value in

  • "online"
  • "offline"
  • "available"
  • "unavailable"
  • "at_capacity"
  • "has_capacity"
source?string

Value in

  • "socket"
  • "toggle"
  • "auto_away"
  • "assignment"
  • "resolution"
  • "system"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/escalation-dashboard/availability-events"
{  "success": true,  "data": {    "events": [      {        "_id": "7b2c4e0d9f1a3b4e5c6d7e8f9012",        "userId": "5f7b1c2e8a1d4e0012c3b4a5",        "userName": "Sam Patel",        "category": "availability",        "value": "available",        "source": "toggle",        "occurredAt": "2026-05-18T14:31:02.000Z"      }    ],    "pagination": {      "page": 1,      "limit": 50,      "total": 143,      "totalPages": 3    }  }}