Help Search

Folders Move PRO

To move a Folder, e.g. change the folder_parent_id, you can make a PUT request to /move/folder/<folderUuid>.json with the folder parent id in the body.

If you want to change the folder_parent_id, you need to use the “move” endpoint (as it can affect multiple folder relations, for other users).

Similarly If you want to change the folder permission, you need to use the “share” endpoint.

PUT /move/folder/<folderId>.json

A similar endpoint exists to move a resource:

PUT /move/resource/<resourceId>.json

Request data

The request body expects the following request data

Parameter Description Required Validation Constraints
folder_parent_id The new parent folder Yes
  1. Valid UUID
  2. Not empty
  3. Folder exists

Possible responses

Code Description
200 OK
The Folder was moved.
400 Bad Request
Some of the data validation failed.
403 Authentication Failure
The user making the request is not authenticated
404 Not found
The resource does not exist or has been deleted.

Examples

Successful request

And a valid request body will look like:

POST /move/folder/d4ed8049-7aaa-43e3-88dd-113f6a73dbb8.json
{
  "folder_parent_id":"8ddbf87e-b66d-4ebd-a026-47d0f4120db9"
}

Success response

A response to a valid request will look like this:

{
     "header": {
         "id": "f943858c-a395-4f38-8d95-3bfff68d7f5e",
         "status": "success",
         "servertime": 1619793763,
         "action": "d91341f2-9672-5f4d-b7f5-d82020faa47e",
         "message": "The folder has been moved successfully.",
         "url": "\/move\/folder\/d4ed8049-7aaa-43e3-88dd-113f6a73dbb8.json",
         "code": 200
     },
     "body": null
 }

Validation error response

A successful request must pass all the validation checks. For example sending a blank request body will return:

{
    "header": {
        "id": "a91e1c30-568f-4889-8eec-dd78c0a00543",
        "status": "error",
        "servertime": 1554981597,
        "action": "a1a15b91-72f6-5708-8d7f-6940e51d8595",
        "message": "Could not validate folder data.",
        "url": "\/move\/folder\/d4ed8049-7aaa-43e3-88dd-113f6a73dbb8.json",
        "code": 400
    },
    "body": {
        "folder_parent_id": {
            "folder_exists": "The folder parent does not exist."
        }
    }
}

Last updated

This article was last updated on April 29th, 2021.

For another perspective on the API you browse the OpenAPI 2.0 specifications using the dedicated API reference site (Swagger UI).

API Reference

You can also find the latest OpenAPI 2.0 specifications directly on the dedicated repository.

OpenAPI Specs repository
🍪   Do you accept cookies for statistical purposes? (Read more) Accept No thanks!