Coder Insights API
The Insights API from Coder — 5 operation(s) for insights.
The Insights API from Coder — 5 operation(s) for insights.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/coder:coder-insights-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: Coderd is the service created by running coder server. It is a thin API that connects workspaces, provisioners and users. coderd stores its state in Postgres and is the only service that communicates with Postgres.
title: Coder Insights API
termsOfService: https://coder.com/legal/terms-of-service
contact:
name: API Support
url: https://coder.com
email: support@coder.com
license:
name: AGPL-3.0
url: https://github.com/coder/coder/blob/main/LICENSE
version: '2.0'
servers:
- url: /
tags:
- name: Insights
paths:
/api/v2/insights/daus:
get:
tags:
- Insights
summary: Get deployment DAUs
operationId: get-deployment-daus
parameters:
- description: Time-zone offset (e.g. -2)
name: tz_offset
in: query
required: true
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.DAUsResponse'
security:
- CoderSessionToken: []
/api/v2/insights/templates:
get:
tags:
- Insights
summary: Get insights about templates
operationId: get-insights-about-templates
parameters:
- description: Start time
name: start_time
in: query
required: true
schema:
type: string
format: date-time
- description: End time
name: end_time
in: query
required: true
schema:
type: string
format: date-time
- description: Interval
name: interval
in: query
required: true
schema:
type: string
enum:
- week
- day
- description: Template IDs
name: template_ids
in: query
style: form
explode: false
schema:
type: array
items:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.TemplateInsightsResponse'
security:
- CoderSessionToken: []
/api/v2/insights/user-activity:
get:
tags:
- Insights
summary: Get insights about user activity
operationId: get-insights-about-user-activity
parameters:
- description: Start time
name: start_time
in: query
required: true
schema:
type: string
format: date-time
- description: End time
name: end_time
in: query
required: true
schema:
type: string
format: date-time
- description: Template IDs
name: template_ids
in: query
style: form
explode: false
schema:
type: array
items:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.UserActivityInsightsResponse'
security:
- CoderSessionToken: []
/api/v2/insights/user-latency:
get:
tags:
- Insights
summary: Get insights about user latency
operationId: get-insights-about-user-latency
parameters:
- description: Start time
name: start_time
in: query
required: true
schema:
type: string
format: date-time
- description: End time
name: end_time
in: query
required: true
schema:
type: string
format: date-time
- description: Template IDs
name: template_ids
in: query
style: form
explode: false
schema:
type: array
items:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.UserLatencyInsightsResponse'
security:
- CoderSessionToken: []
/api/v2/insights/user-status-counts:
get:
tags:
- Insights
summary: Get insights about user status counts
operationId: get-insights-about-user-status-counts
parameters:
- description: IANA timezone name (e.g. America/St_Johns)
name: timezone
in: query
schema:
type: string
- description: 'Deprecated: Time-zone offset (e.g. -2). Use timezone instead.'
name: tz_offset
in: query
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/codersdk.GetUserStatusCountsResponse'
security:
- CoderSessionToken: []
components:
schemas:
codersdk.TemplateInsightsReport:
type: object
properties:
active_users:
type: integer
example: 22
apps_usage:
type: array
items:
$ref: '#/components/schemas/codersdk.TemplateAppUsage'
end_time:
type: string
format: date-time
parameters_usage:
type: array
items:
$ref: '#/components/schemas/codersdk.TemplateParameterUsage'
start_time:
type: string
format: date-time
template_ids:
type: array
items:
type: string
format: uuid
usage_total_seconds:
description: 'UsageTotalSeconds counts each user''s active minutes once, even when apps
overlap. Summed per-app seconds can exceed this total.'
type: integer
example: 120000
codersdk.TemplateInsightsResponse:
type: object
properties:
interval_reports:
type: array
items:
$ref: '#/components/schemas/codersdk.TemplateInsightsIntervalReport'
report:
$ref: '#/components/schemas/codersdk.TemplateInsightsReport'
codersdk.TemplateVersionParameterOption:
type: object
properties:
description:
type: string
icon:
type: string
name:
type: string
value:
type: string
codersdk.TemplateInsightsIntervalReport:
type: object
properties:
active_users:
type: integer
example: 14
end_time:
type: string
format: date-time
interval:
allOf:
- $ref: '#/components/schemas/codersdk.InsightsReportInterval'
example: week
start_time:
type: string
format: date-time
template_ids:
type: array
items:
type: string
format: uuid
codersdk.UserStatusChangeCount:
type: object
properties:
count:
type: integer
example: 10
date:
type: string
format: date-time
codersdk.InsightsReportInterval:
type: string
enum:
- day
- week
x-enum-varnames:
- InsightsReportIntervalDay
- InsightsReportIntervalWeek
codersdk.UserActivity:
type: object
properties:
avatar_url:
type: string
format: uri
seconds:
type: integer
example: 80500
template_ids:
type: array
items:
type: string
format: uuid
user_id:
type: string
format: uuid
username:
type: string
codersdk.ConnectionLatency:
type: object
properties:
p50:
type: number
example: 31.312
p95:
type: number
example: 119.832
codersdk.UserActivityInsightsReport:
type: object
properties:
end_time:
type: string
format: date-time
start_time:
type: string
format: date-time
template_ids:
type: array
items:
type: string
format: uuid
users:
type: array
items:
$ref: '#/components/schemas/codersdk.UserActivity'
codersdk.DAUEntry:
type: object
properties:
amount:
type: integer
date:
description: 'Date is a string formatted as 2024-01-31.
Timezone and time information is not included.'
type: string
codersdk.GetUserStatusCountsResponse:
type: object
properties:
status_counts:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/codersdk.UserStatusChangeCount'
codersdk.UserActivityInsightsResponse:
type: object
properties:
report:
$ref: '#/components/schemas/codersdk.UserActivityInsightsReport'
codersdk.UserLatencyInsightsResponse:
type: object
properties:
report:
$ref: '#/components/schemas/codersdk.UserLatencyInsightsReport'
codersdk.TemplateParameterValue:
type: object
properties:
count:
type: integer
value:
type: string
codersdk.DAUsResponse:
type: object
properties:
entries:
type: array
items:
$ref: '#/components/schemas/codersdk.DAUEntry'
tz_hour_offset:
type: integer
codersdk.UserLatencyInsightsReport:
type: object
properties:
end_time:
type: string
format: date-time
start_time:
type: string
format: date-time
template_ids:
type: array
items:
type: string
format: uuid
users:
type: array
items:
$ref: '#/components/schemas/codersdk.UserLatency'
codersdk.ConnectionLogMethod:
type: string
enum:
- ssh
- reconnecting_pty
- workspace_app
- port_forwarding
- tunnel
x-enum-varnames:
- ConnectionLogMethodSSH
- ConnectionLogMethodReconnectingPTY
- ConnectionLogMethodWorkspaceApp
- ConnectionLogMethodPortForwarding
- ConnectionLogMethodTunnel
codersdk.TemplateAppUsage:
type: object
properties:
display_name:
type: string
example: VS Code
icon:
type: string
method:
description: Method is how the app connected. Method and Slug identify an app.
allOf:
- $ref: '#/components/schemas/codersdk.ConnectionLogMethod'
example: ssh
seconds:
type: integer
example: 80500
seconds_is_upper_bound:
description: 'SecondsIsUpperBound marks overflow usage that includes folded apps.
Their overlap is not stored, so Seconds may overestimate active time.'
type: boolean
example: false
slug:
type: string
example: vscode
template_ids:
type: array
items:
type: string
format: uuid
times_used:
type: integer
example: 2
codersdk.UserLatency:
type: object
properties:
avatar_url:
type: string
format: uri
latency_ms:
$ref: '#/components/schemas/codersdk.ConnectionLatency'
template_ids:
type: array
items:
type: string
format: uuid
user_id:
type: string
format: uuid
username:
type: string
codersdk.TemplateParameterUsage:
type: object
properties:
description:
type: string
display_name:
type: string
name:
type: string
options:
type: array
items:
$ref: '#/components/schemas/codersdk.TemplateVersionParameterOption'
template_ids:
type: array
items:
type: string
format: uuid
type:
type: string
values:
type: array
items:
$ref: '#/components/schemas/codersdk.TemplateParameterValue'
securitySchemes:
AIGatewayKey:
type: apiKey
name: X-AI-Governance-Gateway-Key
in: header
Authorization:
type: apiKey
name: Authorization
in: header
CoderSessionToken:
type: apiKey
name: Coder-Session-Token
in: header
x-provenance:
method: harvested
publisher: Coder
source: https://raw.githubusercontent.com/coder/coder/main/coderd/apidoc/swagger.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)