Skip to content
Connect an agent

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/move

TL;DR

QuestionAnswer
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

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Request body

The body has the type MoveFolderBody.

FieldTypeRequiredDescription
fromstringyesThe 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}$.
tostringyesWhere 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

StatusMeaningBody
204The folders moved, or there were none.none
400A path breaks the folder rule (validation.failed; details says why).ErrorResponse
401Not signed in.ErrorResponse
403The 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
404No such organisation, or the caller is not a member of it.ErrorResponse
409The folder would go into itself or a folder inside it (conflict).ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

See also

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