Connection logs are created when the connection status of agents is changed. You can list connection logs of all agents or view a specific log with its ID.
Property name | Type | Description |
---|---|---|
id | int | The unique ID of the connection log. |
agent | int | The ID of an agent who owns the connection log. |
fromConnection | string | The previous connection status of the agent. Valid values are ONLINE, OFFLINE, and AWAY. |
toConnection | int | The changed connection status of the agent. Valid values are ONLINE, OFFLINE, and AWAY. |
durationTime | string | The time that indicates how long the current connection status has been maintained. |
createdAt | string | The date and time when the connection status was changed, in ISO 8601 format. |
createdBy | int | The subject who changed the connection status. |
- API endpoints are relative to the base URL allocated to your application. In this page, the
/agent_connection_logs
endpoint refers tohttps://desk-api-{application_id}.sendbird.com/platform/v1/agent_connection_logs
.
Note: If you want to know your application ID, sign in to your dashboard, go to the Settings > Application > General, and then check the Application ID.
- It's recommended that the parameter values in API URLs be urlencoded, such as
{agent_id}
.
Action | HTTP request |
---|---|
| |
|
Retrieves a list of connection logs of all agents.
Note: If you want to retrieve connection logs of a specific agent, refer to Retrieve a list of an agent's connection logs action in the Agent page.
GET https://desk-api-{application_id}.sendbird.com/platform/v1/agent_connection_logs
The following table lists the parameters that this action supports.
Parameters
Optional | Type | Description |
---|---|---|
limit | int | Specifies the number of results to return per page. Acceptable values are 1 to 500, inclusive. (Default: 50) |
int | Specifies the number of results to skip before retrieving the next page in the result set. This is used to adjust the starting index of the next page. (Default: 0) |
Query string example
?limit=50&offset=50
If successful, this action returns a list of connection log resources in the response body.
Status: 200 OK
{
"count": 32431,
"previous": null,
"next": "https://desk-api-xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx.sendbird.com/platform/v1/agents_connetion_logs?limit=50&offset=100",
"results": [
{
"id": 473,
"agent": 27,
"fromConnection": "OFFLINE",
"toConnection": "ONLINE",
"durationTime": "10196820",
"createdAt": "2019-07-18T09:13:44.846926Z",
"createdBy": 27
},
... # More connection logs
]
}
Property name | Type | Description |
---|---|---|
count | int | The total count of agents registered in the application. |
previous | string | The URL to retrieve the previous page in the result set. |
next | string | The URL to retrieve the next page in the result set. |
results[] | list | A list of agents. |
Retrieves information on a specific connection log.
GET https://desk-api-{application_id}.sendbird.com/platform/v1/agent_connection_logs/{connection_log_id}
The following table lists the parameters that this action supports.
Parameters
Required | Type | Description |
---|---|---|
connection_log_id | int | Specifies the unique ID of the target connection log. |
If successful, this action returns a connection log resource in the response body.