Organisations
Rename or move a folder
Moves the folders made in the portal at and under from to to, keeping what is below.
POST
/orgs/{org}/folders/moveTL;DR
| Question | Answer |
|---|---|
| What does it do? | Rename or move a folder. |
| What does it take? | A JSON body of type MoveFolderBody. |
| What does it return? | Status 204 with no body. |
| What can go wrong? | 400 a path breaks the folder rule (validation.failed; details says why); 401 not signed in; 403 the role may not (orgs.forbidden), a rule keeps a place from the caller (orgs.folder_restricted), or the request came from an origin that may not make changes; 404 no such organisation, or the caller is not a member of it; 409 the folder would go into itself or a folder inside it (conflict); 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope. |
What it does
Moves the folders made in the portal at and under from to to, keeping what is below. Diagrams are moved one by one with the diagram route. Owner, admin or member.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
Request body
The body has the type MoveFolderBody.
| Field | Type | Required | Description |
|---|---|---|---|
from | string | yes | The folder that moves, with every folder inside it. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
to | string | yes | Where it goes: its new path, which may rename it, move it, or both. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 204 | The folders moved, or there were none. | none |
| 400 | A path breaks the folder rule (validation.failed; details says why). | ErrorResponse |
| 401 | Not signed in. | ErrorResponse |
| 403 | The role may not (orgs.forbidden), a rule keeps a place from the caller (orgs.folder_restricted), or the request came from an origin that may not make changes. | ErrorResponse |
| 404 | No such organisation, or the caller is not a member of it. | ErrorResponse |
| 409 | The folder would go into itself or a folder inside it (conflict). | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Organisations are not set up on this server. | 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 |