Skip to content
Connect an agent
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}/drift

TL;DR

QuestionAnswer
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

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Responses

StatusMeaningBody
200The dashboard.OrgDrift
401Not signed in, or the key is not valid.ErrorResponse
404No such organisation, the caller is not a member of it, or the key is another organisation's.ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type OrgDrift.

FieldTypeRequiredDescription
activebooleanyesTrue when the owner's plan includes the drift dashboard. When false the lists are empty and run reports are refused.
plan"free" | "pro" | "enterprise"yesThe organisation's plan, which is its owner's.
retentionDaysintegeryesDays 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.
repositoriesDriftRepository[]yesEvery repository with a stored status, by name.
repositories[].repositorystringyes
repositories[].sourcesintegeryesminimum 0.
repositories[].inStepintegeryesminimum 0.
repositories[].driftedintegeryesminimum 0.
repositories[].writtenintegeryesminimum 0.
repositories[].failedintegeryesminimum 0.
repositories[].refstring | nullyes
repositories[].shastring | nullyes
repositories[].runUrlstring | nullyesThe run on GitHub, or null.
repositories[].pullRequestUrlstring | nullyesThe pull request, or null.
repositories[].checkedAtintegeryesWhen the run was reported, in milliseconds since the epoch.
sourcesDriftSource[]yesThe latest status of every source: failed first, then drifted, written and in step, each by repository and name.
sources[].repositorystringyes
sources[].namestringyes
sources[].outstringyes
sources[].status"in-step" | "drifted" | "written" | "failed"yes
sources[].addedintegeryesminimum 0.
sources[].removedintegeryesminimum 0.
sources[].changedintegeryesminimum 0.
sources[].errorsintegeryesminimum 0.
sources[].ownersstring[]yesThe owners CODEOWNERS gave the path, as written there.
sources[].refstring | nullyes
sources[].shastring | nullyes
sources[].runUrlstring | nullyesThe run on GitHub, or null.
sources[].pullRequestUrlstring | nullyesThe pull request, or null.
sources[].checkedAtintegeryesWhen the run was reported, in milliseconds since the epoch.
truncatedbooleanyesTrue when there were more sources than one answer carries.
runsDriftRun[]yesThe latest runs, newest first.
runs[].idstringyes
runs[].repositorystringyes
runs[].eventstring | nullyes
runs[].sourcesintegeryesminimum 0.
runs[].driftedintegeryesminimum 0.
runs[].failedintegeryesminimum 0.
runs[].errorsintegeryesminimum 0.
runs[].refstring | nullyes
runs[].shastring | nullyes
runs[].runUrlstring | nullyesThe run on GitHub, or null.
runs[].pullRequestUrlstring | nullyesThe pull request, or null.
runs[].checkedAtintegeryesWhen the run was reported, in milliseconds since the epoch.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools