Organisations
Move a member's public diagram into the library
Copies the picture into the private library under a new id, then removes the public diagram and its stable links.
POST
/orgs/{org}/publishing/public-diagrams/{id}/moveTL;DR
| Question | Answer |
|---|---|
| What does it do? | Move a member's public diagram into the library. |
| What does it take? | org, id in the path. |
| What does it return? | Status 200 with a body of type MovedMemberDiagram. |
| What can go wrong? | 401 not signed in; 403 only the owner or an admin may (orgs.forbidden), the library is full (hosting.quota_exceeded), or the request came from an origin that may not make changes; 404 no such organisation, the caller is not a member of it, or the diagram is not on the list; 409 the organisation does not require its library now (orgs.publish_review_unavailable); 413 the picture is larger than the plan hosts; 429 too many requests; 502 the picture could not be read or stored; nothing was removed; 503 organisations or hosting are not set up on this server. Every failure uses the one error envelope. |
What it does
Copies the picture into the private library under a new id, then removes the public diagram and its stable links. The owner or an admin, while the library is required.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
id | string | yes |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Moved. | MovedMemberDiagram |
| 401 | Not signed in. | ErrorResponse |
| 403 | Only the owner or an admin may (orgs.forbidden), the library is full (hosting.quota_exceeded), or the request came from an origin that may not make changes. | ErrorResponse |
| 404 | No such organisation, the caller is not a member of it, or the diagram is not on the list. | ErrorResponse |
| 409 | The organisation does not require its library now (orgs.publish_review_unavailable). | ErrorResponse |
| 413 | The picture is larger than the plan hosts. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 502 | The picture could not be read or stored; nothing was removed. | ErrorResponse |
| 503 | Organisations or hosting are not set up on this server. | ErrorResponse |
Response body
A 200 answer has the type MovedMemberDiagram.
| Field | Type | Required | Description |
|---|---|---|---|
diagram | OrganisationDiagram | yes | |
diagram.id | string | yes | The handle for the diagram in the routes below. |
diagram.name | string | null | yes | The label given at publish, or null. |
diagram.folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
diagram.theme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
diagram.bytes | integer | yes | Size of the stored SVG in bytes. |
diagram.createdBy | string | null | yes | The account that published it, or null when that account has left or an organisation key published it. |
diagram.createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
diagram.publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
diagram.expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the owner's plan keeps diagrams until they are deleted. |
diagram.viewUrl | string | yes | A page in the portal that shows the diagram to a signed-in member. It is not a link anyone can open: an organisation's diagrams have no public address. |
diagram.locked | boolean | yes | True while the owner has the diagram locked: nobody can delete, rename or move it, its publisher and the owner included, until the owner unlocks it. A lock does not stop it expiring on a plan that expires diagrams. |
diagram.lockedAt | integer | null | yes | When the owner locked it, in milliseconds since the epoch, or null when it is not locked. |
diagram.restricted | true | no | Present, and true, when the owner has restricted this diagram's folder and the caller is allowed in it, so the portal can show it as locked. Absent otherwise. A diagram in a folder the caller may not use is not listed at all. |
merged | boolean | yes | True when the library already held exactly this picture, so only the public copy went. |
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 |