Skip to content
Connect an agent

Organisations

Read one diagram's evidence

One diagram drawn from code: its currency and controls, its check history on the default branch, and its drift episodes with the pull requests that resolved them.

GET/orgs/{org}/evidence/diagram

TL;DR

QuestionAnswer
What does it do?Read one diagram's evidence.
What does it take?org in the path, and repository, name in the query string.
What does it return?Status 200 with a body of type EvidenceDiagramDetail.
What can go wrong?400 the query is not valid; 401 not signed in; 403 a plan without compliance evidence (plan.compliance_evidence_not_included); 404 no such organisation, the caller is not a member of it, or no check of the diagram is kept (evidence.diagram_not_found); 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope.

What it does

One diagram drawn from code: its currency and controls, its check history on the default branch, and its drift episodes with the pull requests that resolved them. Every member, on Enterprise.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Query parameters

FieldTypeRequiredDescription
repositorystringyesThe repository, as owner/name.
namestringyesThe source's name.

Responses

StatusMeaningBody
200The diagram.EvidenceDiagramDetail
400The query is not valid.ErrorResponse
401Not signed in.ErrorResponse
403A plan without compliance evidence (plan.compliance_evidence_not_included).ErrorResponse
404No such organisation, the caller is not a member of it, or no check of the diagram is kept (evidence.diagram_not_found).ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type EvidenceDiagramDetail.

FieldTypeRequiredDescription
diagramEvidenceDiagramyes
diagram.repositorystringyes
diagram.namestringyes
diagram.outstringyesThe diagram's path in the repository.
diagram.formatstring | nullyesThe importer it is drawn with, as the run reported or as its name says, or null.
diagram.status"current" | "drifted" | "stale" | "unknown"yescurrent, drifted, stale or unknown, by the checks on the default branch (docs/architecture/compliance-evidence.md, section 2).
diagram.lastKnown"current" | "drifted" | nullyesFor a stale diagram, what its latest conclusive check found.
diagram.lastCheckFailedbooleanyesTrue when the latest check could not make the diagram; the status is the one before it.
diagram.driftedSinceinteger | nullyesFor a drifted diagram, when its drift began.
diagram.addedintegeryesminimum 0.
diagram.removedintegeryesminimum 0.
diagram.changedintegeryesminimum 0.
diagram.lastCheckedAtinteger | nullyes
diagram.lastShastring | nullyes
diagram.runUrlstring | nullyes
diagram.pullRequestUrlstring | nullyes
diagram.controlsstring[]yesThe controls it serves as evidence for, suggested or set.
diagram.suggestedstring[]yesThe controls its format suggests.
checksEvidenceCheck[]yes
checks[].status"in-step" | "drifted" | "written" | "failed"yes
checks[].checksintegeryes
checks[].firstAtintegeryes
checks[].lastAtintegeryes
checks[].firstShastring | nullyes
checks[].lastShastring | nullyes
checks[].runUrlstring | nullyes
checks[].pullRequestUrlstring | nullyes
checks[].addedintegeryesminimum 0.
checks[].removedintegeryesminimum 0.
checks[].changedintegeryesminimum 0.
truncatedbooleanyes
episodesEvidenceEpisode[]yes
episodes[].startedAtintegeryes
episodes[].resolvedAtinteger | nullyes
episodes[].checksintegeryesminimum 0.
episodes[].addedintegeryesminimum 0.
episodes[].removedintegeryesminimum 0.
episodes[].changedintegeryesminimum 0.
episodes[].pullRequestUrlstring | nullyes
episodes[].resolvedShastring | nullyes
episodes[].resolvedRunUrlstring | nullyes

See also

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