Hosting
File a hosted diagram in a folder
Moves the diagram into a folder (a path such as Payments/Checkout, up to five levels and forty characters a name) or to the top level with null.
PATCH
/user/diagrams/{id}TL;DR
| Question | Answer |
|---|---|
| What does it do? | File a hosted diagram in a folder. |
| What does it take? | A JSON body of type MoveDiagramBody. |
| What does it return? | Status 204 with no body. |
| What can go wrong? | 400 the folder path is not valid; details says why; 401 not signed in; 403 the request came from an origin that may not make changes; 404 no such diagram; 409 the diagram is locked (hosting.diagram_locked); details says when and that you can unlock it; 429 too many requests. Every failure uses the one error envelope. |
What it does
Moves the diagram into a folder (a path such as Payments/Checkout, up to five levels and forty characters a name) or to the top level with null. An invalid path is a 400 with the reason, never rewritten. The link and the expiry do not change. A diagram that is not yours is a 404.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Request body
The body has the type MoveDiagramBody.
| Field | Type | Required | Description |
|---|---|---|---|
folder | string | null | yes | The folder to file the diagram in, or null for the top level. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 204 | Moved. | none |
| 400 | The folder path is not valid; details says why. | ErrorResponse |
| 401 | Not signed in. | ErrorResponse |
| 403 | The request came from an origin that may not make changes. | ErrorResponse |
| 404 | No such diagram. | ErrorResponse |
| 409 | The diagram is locked (hosting.diagram_locked); details says when and that you can unlock it. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
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 |