Platform API
Desk Agent Connection Logs

Connection Logs

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.

Resource representation

Property nameTypeDescription

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.

Actions

  • API endpoints are relative to the base URL allocated to your application. In this page, the /agent_connection_logs endpoint refers to https://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}.
ActionHTTP request

List connection logs

GET /agent_connection_logs
Retrieves a list of connection logs of all agents.

View a connection log

GET /agent_connection_logs/{connection_log_id}
Retrieves information on a specific connection log.


List connection logs

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.

HTTP request

Light Color Skin
Copy
GET https://desk-api-{application_id}.sendbird.com/platform/v1/agent_connection_logs 

Parameters

The following table lists the parameters that this action supports.

Parameters
OptionalTypeDescription

limit

int

Specifies the number of results to return per page. Acceptable values are 1 to 500, inclusive. (Default: 50)

offset

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
Light Color Skin
Copy
?limit=50&offset=50

Response

If successful, this action returns a list of connection log resources in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "count": 32431,
    "previous": null,
    "next": "https://desk-api-{application_id}.sendbird.com/platform/v1/agents_connetion_logs?limit=50&offset=50",
    "results": [
        {
            "id": 473,
            "agent": 27,
            "fromConnection": "OFFLINE",
            "toConnection": "ONLINE",
            "durationTime": "10196820",
            "createdAt": "2019-07-18T09:13:44.846926Z",
            "createdBy": 27
        },
        ... # More connection logs
    ]
}
Property nameTypeDescription

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.


View a connection log

Retrieves information on a specific connection log.

HTTP request

Light Color Skin
Copy
GET https://desk-api-{application_id}.sendbird.com/platform/v1/agent_connection_logs/{connection_log_id}

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

connection_log_id

int

Specifies the unique ID of the target connection log.

Response

If successful, this action returns a connection log resource in the response body.