Desk Platform API v1
Desk Platform API
Desk Platform API
Version 1

Connection logs

Copy link

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

Copy link

The following table shows the list of properties in a connection logs resource.

Property nameTypeDescription

id

int

The unique ID of the connection log.

agent

int

The ID of the agent who owns the connection log.

prevStatus

string

The previous connection status of the agent. Valid values are ONLINE, OFFLINE, and AWAY.

currentStatus

string

The current 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.

reason

string

The reason for the connection status change, particularly when the status is changed to AWAY.

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.

fromConnection

string

(Deprecated) Superseded by prevStatus.

toConnection

string

(Deprecated) Superseded by currentStatus.


Actions

Copy link
  • 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}.

List of actions

Copy link
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

Copy link

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

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

Parameters

Copy link

The following table lists the parameters that this action supports.

Optional
Parameter nameTypeDescription

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 when receiving a response. The value of offset is also used as the starting index of each page. (Default: 0)

agent_id

int

A list of agent IDs to filter the results.
An example can be ?agent_id=1&agent_id=2&agent_id=10

start_date

string

Specifies the start date of the logs to retrieve, in YYYY-MM-DD format.

end_date

string

Specifies the end date of the logs to retrieve, in YYYY-MM-DD format.

?limit=50&offset=50

Response

Copy link

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

{
    "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,
            "prevStatus": "OFFLINE",
            "currentStatus": "ONLINE",
            "reason": "Break",
            "durationTime": "10196820",
            "createdAt": "2019-07-18T09:13:44.846926Z",
            "createdBy": 27
        },
        ... # More connection logs
    ]
}

List of response properties

Copy link
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

Copy link

Retrieves information on a specific connection log.

HTTP request

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

Parameters

Copy link

The following table lists the parameters that this action supports.

Required
Parameter nameTypeDescription

connection_log_id

int

Specifies the unique ID of a target connection log.

Response

Copy link

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