Skip to content
Skip to Content
Coder Docs

Get connection logs

GET
/api/v2/connectionlog

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Query Parameters

q?string

Search query

limit*integer

Page limit

offset?integer

Page offset

Response Body

OK

application/json
  1. response
connection_logs?array<>
count?integer
count_cap?integer

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X GET \	"$CODER_URL/api/v2/connectionlog?limit={limit}" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response200
{  "connection_logs": [    {      "agent_name": "string",      "app_display_name": "string",      "app_name": "string",      "connect_time": "2019-08-24T14:15:22Z",      "connection_method": "ssh",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "ip": "string",      "organization": {        "display_name": "string",        "icon": "string",        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string"      },      "ssh_info": {        "client_session_id": "string",        "connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9",        "disconnect_reason": "string",        "disconnect_time": "2019-08-24T14:15:22Z",        "exit_code": 0      },      "type": "string",      "web_info": {        "slug_or_port": "string",        "status_code": 0,        "user": {          "avatar_url": "http://example.com",          "created_at": "2019-08-24T14:15:22Z",          "email": "[email protected]",          "has_ai_seat": true,          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "is_service_account": true,          "last_seen_at": "2019-08-24T14:15:22Z",          "login_type": "",          "name": "string",          "organization_ids": [            "7d4232d7-54a0-4c93-9c1e-a8fd2dfcdabe"          ],          "roles": [            {              "display_name": "string",              "name": "string",              "organization_id": "string"            }          ],          "status": "active",          "theme_preference": "string",          "updated_at": "2019-08-24T14:15:22Z",          "username": "string"        },        "user_agent": "string"      },      "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",      "workspace_name": "string",      "workspace_owner_id": "e7078695-5279-4c86-8774-3ac2367a2fc7",      "workspace_owner_username": "string"    }  ],  "count": 0,  "count_cap": 0}