---
title: "Get deployment stats"
method: GET
path: "/api/v2/deployment/stats"
tags: ["General"]
---

# Get deployment stats

`GET /api/v2/deployment/stats`

## Response `200`

OK

- CodersdkDeploymentStats
  - `aggregated_from` string, date-time — AggregatedFrom is the time in which stats are aggregated from. This might be back in time a specific duration or interval.
  - `collected_at` string, date-time — CollectedAt is the time in which stats are collected at.
  - `next_update_at` string, date-time — NextUpdateAt is the time when the next batch of stats will be updated.
  - `session_count` CodersdkSessionCountDeploymentStats
    - `jetbrains` integer
    - `reconnecting_pty` integer
    - `ssh` integer
    - `vscode` integer
  - `workspaces` CodersdkWorkspaceDeploymentStats
    - `building` integer
    - `connection_latency_ms` CodersdkWorkspaceConnectionLatencyMS
      - `p50` number
      - `p95` number
    - `failed` integer
    - `pending` integer
    - `running` integer
    - `rx_bytes` integer
    - `stopped` integer
    - `tx_bytes` integer

---

[API](https://skmtc.net/coder/apis/coder-api.md) · [All operations](https://skmtc.net/coder/apis/coder-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coder/coder-api/revisions/50a77af44008/schema)
