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}/versionsTL;DR
| Question | Answer |
|---|---|
| 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
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The versions. | DiagramVersionList |
| 401 | Not signed in. | ErrorResponse |
| 404 | No such diagram. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Hosting is not set up on this server. | ErrorResponse |
Response body
A 200 answer has the type DiagramVersionList.
| Field | Type | Required | Description |
|---|---|---|---|
items | DiagramVersion[] | yes | Newest first. A diagram keeps at most ten. |
items[].id | string | yes | The handle for restoring it. |
items[].savedAt | integer | yes | When it stopped being the current picture, in milliseconds since the epoch. |
items[].bytes | integer | yes | Size of the stored SVG in bytes. Versions do not count toward the plan. |
items[].theme | "light" | "dark" | "auto" | yes |
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 |