Skip to content
Skip to Content
Coder Docs

Get deployment stats

GET
/api/v2/deployment/stats

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Response Body

OK

application/json
  1. response
aggregated_from?string

AggregatedFrom is the time in which stats are aggregated from. This might be back in time a specific duration or interval.

Formatdate-time
collected_at?string

CollectedAt is the time in which stats are collected at.

Formatdate-time
next_update_at?string

NextUpdateAt is the time when the next batch of stats will be updated.

Formatdate-time
session_count?
workspaces?

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

curl -X GET \	"$CODER_URL/api/v2/deployment/stats" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response200
{  "aggregated_from": "2019-08-24T14:15:22Z",  "collected_at": "2019-08-24T14:15:22Z",  "next_update_at": "2019-08-24T14:15:22Z",  "session_count": {    "apps": {      "property1": {        "count": 0,        "display_name": "string",        "family": "vscode",        "icon": "string"      },      "property2": {        "count": 0,        "display_name": "string",        "family": "vscode",        "icon": "string"      }    },    "jetbrains": 0,    "reconnecting_pty": 0,    "ssh": 0,    "vscode": 0  },  "workspaces": {    "building": 0,    "connection_latency_ms": {      "p50": 0,      "p95": 0    },    "failed": 0,    "pending": 0,    "running": 0,    "rx_bytes": 0,    "stopped": 0,    "tx_bytes": 0  }}