Skip to content
Connect an agent
Hosting

List your hosted diagrams

The account's hosted diagrams, most recently published first and at most 200, with the account's plan, how many diagrams and bytes it holds in total, and the plan's limits.

GET/user/diagrams

TL;DR

QuestionAnswer
What does it do?List your hosted diagrams.
What does it take?Nothing.
What does it return?Status 200 with a body of type HostedDiagramList.
What can go wrong?401 not signed in; 429 too many requests; 503 hosting is not set up on this server. Every failure uses the one error envelope.

What it does

The account's hosted diagrams, most recently published first and at most 200, with the account's plan, how many diagrams and bytes it holds in total, and the plan's limits.

Responses

StatusMeaningBody
200The diagrams and the usage.HostedDiagramList
401Not signed in.ErrorResponse
429Too many requests.ErrorResponse
503Hosting is not set up on this server.ErrorResponse

Response body

A 200 answer has the type HostedDiagramList.

FieldTypeRequiredDescription
itemsHostedDiagram[]yesAt most 200, newest published first.
items[].idstringyesThe handle for managing the diagram (delete). It is not in the link.
items[].urlstringyesThe public address of the SVG. Anyone with the link can see it; the token in it cannot be guessed.
items[].namestring | nullyesThe label given at publish, or null.
items[].folderstring | nullyesThe folder it is filed in, such as Payments/Checkout, or null for the top level.
items[].theme"light" | "dark" | "auto"yesThe color scheme it was drawn in: light, dark, or auto.
items[].bytesintegeryesSize of the stored SVG in bytes.
items[].createdAtintegeryesWhen it was first published, in milliseconds since the epoch.
items[].publishedAtintegeryesWhen it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it.
items[].expiresAtinteger | nullyesWhen it will be deleted, in milliseconds since the epoch, or null when the plan keeps diagrams until you delete them.
items[].lockedbooleanyesTrue while the diagram is locked: it cannot be deleted, renamed or moved until you unlock it. A lock does not stop it expiring on a plan that expires diagrams.
items[].lockedAtinteger | nullyesWhen it was locked, in milliseconds since the epoch, or null when it is not locked.
stableLinksStableLink[]yesEvery stable link the account keeps, by alias, including any whose diagram is gone.
stableLinks[].idstringyesThe handle for managing the stable link (delete). It is not in its address.
stableLinks[].aliasstringyesThe name you gave it. Only you see it.
stableLinks[].urlstringyesThe public address, on the CDN host. It shows the diagram the stable link points at now (cached for up to 60 seconds) and never changes. Anyone with it can see the picture.
stableLinks[].diagramIdstring | nullyesThe diagram it shows now, or null when that diagram was deleted or expired; the address then answers 404 until you point the link at a diagram again.
stableLinks[].createdAtintegeryesWhen it was made, in milliseconds since the epoch.
stableLinks[].updatedAtintegeryesWhen it was last pointed at a diagram, in milliseconds since the epoch.
usageHostingUsageyes
usage.plan"free" | "pro"yesThe plan the account is on, which decides the limits.
usage.countintegeryesHosted diagrams the account holds. This is the total, even when the list is shorter. minimum 0.
usage.bytesintegeryesTotal size of the hosted diagrams in bytes. minimum 0.
usage.stableLinksintegeryesStable links the account keeps. minimum 0.
usage.limitsHostingPlanLimitsyes
usage.limits.dailyCallsintegeryes
usage.limits.hostedDiagramsintegeryes
usage.limits.hostedBytesintegeryes
usage.limits.retentionDaysinteger | nullyesDays a diagram is kept after it was last published, or null to keep it until you delete it.
usage.limits.maxDiagramBytesintegeryes
usage.limits.stableLinksintegeryesStable links the account may keep at once.

See also

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