Skip to content
Connect an agent
Hosting

List a hosted diagram's previous versions

The pictures the diagram had before it was edited or restored in the portal, newest first, at most ten.

GET/user/diagrams/{id}/versions

TL;DR

QuestionAnswer
What does it do?List a hosted diagram's previous versions.
What does it take?id in the path.
What does it return?Status 200 with a body of type DiagramVersionList.
What can go wrong?401 not signed in; 404 no such diagram; 429 too many requests; 503 hosting is not set up on this server. Every failure uses the one error envelope.

What it does

The pictures the diagram had before it was edited or restored in the portal, newest first, at most ten.

Path parameters

FieldTypeRequiredDescription
idstringyes

Responses

StatusMeaningBody
200The versions.DiagramVersionList
401Not signed in.ErrorResponse
404No such diagram.ErrorResponse
429Too many requests.ErrorResponse
503Hosting is not set up on this server.ErrorResponse

Response body

A 200 answer has the type DiagramVersionList.

FieldTypeRequiredDescription
itemsDiagramVersion[]yesNewest first. A diagram keeps at most ten.
items[].idstringyesThe handle for restoring it.
items[].savedAtintegeryesWhen it stopped being the current picture, in milliseconds since the epoch.
items[].bytesintegeryesSize of the stored SVG in bytes. Versions do not count toward the plan.
items[].theme"light" | "dark" | "auto"yes

See also

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