Skip to content

REST API

Live By plan Org adminManager
Access
Read-only, with an API token
Plan
Included by plan
Description
OpenAPI 3.1 at /api/v1/openapi.json

Pull your team’s delivery numbers into your own reports. You can hand this page to an engineer to set it up.

The REST API gives your servers read-only access to your workspace’s analytics. Use it to feed a data warehouse, a reporting tool or an internal dashboard. It returns the same numbers you see in DevGlimpse, under the same visibility rules.

By plan The public API is included with some plans. If your plan does not include it, requests are refused with a message that says so. Check Admin → License → Plan features.

Get a token

An org admin issues API tokens. A token is a secret key your tool sends with each request.

  • Each token has a role, either developer or manager, and acts as the person who issued it.
  • The role and your visibility settings decide which individual rows it can read.
  • A token never has admin rights.
Setup screen coming This works in DevGlimpse today, but its setup screen is not in the app yet. Contact support if you need it before then.

Keep the token secret. It is shown once when it is created. If you lose it, revoke it and issue another.

A token stops working when:

  • it is revoked;
  • the person who issued it is no longer an active org admin;
  • your plan no longer includes the API.

If an admin later widens what the token’s role may see, existing tokens are refused with the code scope_widened. Issue a new token.

Read the OpenAPI description

Every endpoint and parameter is described in an OpenAPI 3.1 document, a standard machine-readable API description. You do not need a token to read it.

GET /api/v1/openapi.json

Use it to generate a client or browse the endpoints in any OpenAPI tool. The server address is listed in the document under its servers.

Make a request

Send the token as a bearer token.

GET /api/v1/analytics/{name}?from=2026-10-01&to=2026-10-31
Authorization: Bearer <your token>
  • GET /api/v1/analytics/{name} runs one named query. Every query takes from and to as dates in YYYY-MM-DD form. The response is { "rows": [...], "nextCursor": ... }, one page at a time (see Pages).
  • GET /api/v1/usage returns your token’s own request counts per day and endpoint for the last 30 days.

Query names include metric_anomalies, ai_adoption_daily, ai_spend_daily, ai_output_by_tool, ci_pipeline_duration, ci_failure_rate, ci_flaky_tests, ci_minutes, ci_flaky_jobs_weekly, ci_rerun_minutes, ci_quarantine_candidates, ci_flaky_test_cases, ci_slow_test_cases, ci_failing_test_cases and ci_test_trend (the last four also take repo, a repository id, or the nil UUID for every repository). The OpenAPI document is the complete, current list.

  • Rows carry contributor ids, never names.
  • Only the API’s GET method is allowed.
  • Responses are never cached.
  • The API is for servers, so browsers cannot call it directly.

Pages

Results come one page at a time, in the query’s own order.

  • limit sets the rows per page: 1 to 5,000, 1,000 by default.
  • When there are more rows, the response’s nextCursor is a string. Send it back as cursor, with the same other parameters, for the next page.
  • nextCursor is null on the last page.
GET /api/v1/analytics/ci_minutes?from=2026-10-01&to=2026-10-31&limit=500
GET /api/v1/analytics/ci_minutes?from=2026-10-01&to=2026-10-31&limit=500&cursor=<nextCursor>

A cursor only works with the query and parameters it came from. Each page is read fresh, so rows can move between pages if new data arrives while you page. For bulk loads, use the warehouse export below.

Load a data warehouse

The warehouse export gives you one day of a query’s rows at a time, as NDJSON: one JSON object per line, ready for a warehouse bulk load.

GET /api/v1/warehouse
GET /api/v1/warehouse/{name}?day=2026-10-05
Authorization: Bearer <your token>
  • GET /api/v1/warehouse lists the datasets. Each one is a named query with one set of rows per day, plus any other parameters it needs. Weekly and rolling-window queries are not datasets; read them with /api/v1/analytics/{name}.
  • GET /api/v1/warehouse/{name}?day=YYYY-MM-DD returns that day’s rows. Each row has a _partition_date column with the day.
  • Replace that day’s partition in your warehouse each time you load it.
  • The x-devglimpse-partition-complete header is false until seven days after the UTC day, because some sources correct recent days late. Keep loading the day until it is true.
  • Send the ETag header back as If-None-Match to skip a day that has not changed. You get a 304 with no body.

The warehouse export follows exactly the same visibility rules as the rest of the API. Rows carry contributor ids, never names, and never pull request text or comments.

Status Meaning
400 An unknown, repeated, missing or malformed parameter, including a cursor from another query.
401 The token is missing, invalid or revoked, or its issuer is no longer an active org admin.
402 Your plan does not include the API.
403 The request came from outside your IP allowlist.
409 The token’s role can now see more than when it was issued. Issue a new token.
429 Too many requests. Wait for the number of seconds in the Retry-After header.
503 The analytics store is briefly unavailable. Retry after the Retry-After seconds.

Rate limits

Requests are limited to 120 per minute per client IP address, and 120 per minute per token. Requests above the limit get a 429 with Retry-After: 60.