Organisations
Read an organisation's drift dashboard
Whether the dashboard is on, the plan and the days runs are kept, every repository with its counts, the latest status of every source with its owners (stale first), and the newest runs.
GET
/orgs/{org}/driftTL;DR
| Question | Answer |
|---|---|
| What does it do? | Read an organisation's drift dashboard. |
| What does it take? | org in the path. |
| What does it return? | Status 200 with a body of type OrgDrift. |
| What can go wrong? | 401 not signed in, or the key is not valid; 404 no such organisation, the caller is not a member of it, or the key is another organisation's; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope. |
What it does
Whether the dashboard is on, the plan and the days runs are kept, every repository with its counts, the latest status of every source with its owners (stale first), and the newest runs. Every member may read it, and so may a key of the organisation.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The dashboard. | OrgDrift |
| 401 | Not signed in, or the key is not valid. | ErrorResponse |
| 404 | No such organisation, the caller is not a member of it, or the key is another organisation's. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Organisations are not set up on this server. | ErrorResponse |
Response body
A 200 answer has the type OrgDrift.
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | yes | True when the owner's plan includes the drift dashboard. When false the lists are empty and run reports are refused. |
plan | "free" | "pro" | "enterprise" | yes | The organisation's plan, which is its owner's. |
retentionDays | integer | yes | Days a run and a status are kept after they were reported, from the owner's plan. Zero on a plan without the dashboard. minimum 0. |
repositories | DriftRepository[] | yes | Every repository with a stored status, by name. |
repositories[].repository | string | yes | |
repositories[].sources | integer | yes | minimum 0. |
repositories[].inStep | integer | yes | minimum 0. |
repositories[].drifted | integer | yes | minimum 0. |
repositories[].written | integer | yes | minimum 0. |
repositories[].failed | integer | yes | minimum 0. |
repositories[].ref | string | null | yes | |
repositories[].sha | string | null | yes | |
repositories[].runUrl | string | null | yes | The run on GitHub, or null. |
repositories[].pullRequestUrl | string | null | yes | The pull request, or null. |
repositories[].checkedAt | integer | yes | When the run was reported, in milliseconds since the epoch. |
sources | DriftSource[] | yes | The latest status of every source: failed first, then drifted, written and in step, each by repository and name. |
sources[].repository | string | yes | |
sources[].name | string | yes | |
sources[].out | string | yes | |
sources[].status | "in-step" | "drifted" | "written" | "failed" | yes | |
sources[].added | integer | yes | minimum 0. |
sources[].removed | integer | yes | minimum 0. |
sources[].changed | integer | yes | minimum 0. |
sources[].errors | integer | yes | minimum 0. |
sources[].owners | string[] | yes | The owners CODEOWNERS gave the path, as written there. |
sources[].ref | string | null | yes | |
sources[].sha | string | null | yes | |
sources[].runUrl | string | null | yes | The run on GitHub, or null. |
sources[].pullRequestUrl | string | null | yes | The pull request, or null. |
sources[].checkedAt | integer | yes | When the run was reported, in milliseconds since the epoch. |
truncated | boolean | yes | True when there were more sources than one answer carries. |
runs | DriftRun[] | yes | The latest runs, newest first. |
runs[].id | string | yes | |
runs[].repository | string | yes | |
runs[].event | string | null | yes | |
runs[].sources | integer | yes | minimum 0. |
runs[].drifted | integer | yes | minimum 0. |
runs[].failed | integer | yes | minimum 0. |
runs[].errors | integer | yes | minimum 0. |
runs[].ref | string | null | yes | |
runs[].sha | string | null | yes | |
runs[].runUrl | string | null | yes | The run on GitHub, or null. |
runs[].pullRequestUrl | string | null | yes | The pull request, or null. |
runs[].checkedAt | integer | yes | When the run was reported, in milliseconds since the epoch. |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |