Get Agent Activity
Retrieve activity data for agents, including their active and open sessions within a specified time range.
GET
/
backend
/
reports
/
{orgId}
/
agents
/
activity
This endpoint provides insights into agent activity, showing the number of active sessions and open sessions for each agent. It helps in monitoring agent workload and performance.
Path Parameters
orgId
string
requiredThe unique identifier of the organization.
Authentication
Authorization
string
requiredBearer token for authentication
Query Parameters
startDate
string
The start date for the report period (ISO 8601 format).
endDate
string
The end date for the report period (ISO 8601 format).
Response
agent_id
number
The unique identifier of the agent.
active_sessions
number
The total number of active sessions handled by the agent within the specified time range.
open_sessions
number
The number of currently open sessions assigned to the agent.
Example Request
curl --location --request GET 'https://api-v2.opencopilot.so/backend/reports/agents/activity?startDate=2023-01-01T00:00:00Z&endDate=2023-12-31T23:59:59Z' \
--header 'Authorization: Bearer YOUR_API_KEY'
Example Response
[
{
"agent_id": 1,
"active_sessions": 150,
"open_sessions": 5
},
{
"agent_id": 2,
"active_sessions": 120,
"open_sessions": 3
},
{
"agent_id": 3,
"active_sessions": 180,
"open_sessions": 7
}
]
Was this page helpful?