Skip to content
Connect an agent

Organisations

Read one request for approval, with what changed

The request, and for a new version what changed against the one the library shows (compare_diagrams).

GET/orgs/{org}/approvals/{id}

TL;DR

QuestionAnswer
What does it do?Read one request for approval, with what changed.
What does it take?org, id in the path.
What does it return?Status 200 with a body of type ApprovalRequestDetail.
What can go wrong?401 not signed in; 403 the caller does not approve (orgs.forbidden); 404 no such organisation or request, or the request is about a diagram in a folder the caller may not use; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope.

What it does

The request, and for a new version what changed against the one the library shows (compare_diagrams). Approvers only.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.
idstringyes

Responses

StatusMeaningBody
200The request and its diff.ApprovalRequestDetail
401Not signed in.ErrorResponse
403The caller does not approve (orgs.forbidden).ErrorResponse
404No such organisation or request, or the request is about a diagram in a folder the caller may not use.ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type ApprovalRequestDetail.

FieldTypeRequiredDescription
itemApprovalRequestyes
item.idstringyes
item.kind"publish" | "change" | "share"yes
item.status"pending" | "approved" | "rejected" | "expired"yes
item.diagramobject | nullyesThe diagram as the library has it now, or null once it is gone (a rejected new diagram).
item.diagram.idstringyes
item.diagram.namestring | nullyes
item.diagram.folderstring | nullyes
item.diagram.classificationClassificationyesA diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is.
item.diagram.theme"light" | "dark" | "auto"yes
item.requestedByobject | nullyesWho asked, or null for an organisation key and once the account is gone.
item.requestedBy.userIdstringyes
item.requestedBy.emailstringyes
item.requestedAtintegeryes
item.expiresAtintegeryes
item.secretFindingsintegeryesHow many things that look like a secret the scan found when the request was made, under the organisation's scanning options. minimum 0.
item.reviewedByobject | nullyes
item.reviewedBy.userIdstringyes
item.reviewedBy.emailstringyes
item.reviewedAtinteger | nullyes
item.commentstring | nullyesThe approver's comment, when they gave one.
diffobject | nullyesFor a new version: what changed against the one the library shows, by meaning (compare_diagrams). Null for a publish and a share.
diff.samebooleanyes
diff.comparedbooleanyesFalse when a side carries no source, so nothing could be compared.
diff.countsobjectyes
diff.counts.addedintegeryes
diff.counts.removedintegeryes
diff.counts.renamedintegeryes
diff.counts.movedintegeryes
diff.counts.changedintegeryes
diff.changesobject[]yes
diff.changes[].changestringyes
diff.changes[].subjectstringyes
diff.changes[].namestringyes
diff.changes[].lineinteger | nullyes
diff.changes[].detailstringyes
diff.truncatedbooleanyes
diff.summarystringyes

See also

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