See Stacksync in action with a solution architect. Book a demo ↗
Folders

Folders

Rename a folder

PATCH
/v1/workspaces/{workspace_id}/folders/{folder_id}

A name another folder has in the region of the workspace is refused with 409, as a create refuses it. With validate_only, every check runs and 204 answers, nothing is saved.

Authorization

Authorizationstringheaderrequired

Bearer <key>, where <key> is a workspace API key or a user API key. See Authentication.

Path Parameters

workspace_id*integer

The workspace. List the ones your key can reach with GET /v1/workspaces.

folder_id*string

The folder.

Formatuuid

Query Parameters

region*Regions

Region of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them

Value in"besg""usnv"

Request Body

application/json
  1. body
folder_name*Folder Name
Length1 <= length <= 255
validate_only?Validate Only

Run every check of the write and answer 204 without writing: a refused write answers the error the write would

Defaultfalse

Response Body

OK

application/json
  1. response

A folder of the workspace

folder_id*Folder Id
folder_name*Folder Name
folder_resource_id*Folder Resource Id
parent_folder_id*|

The folder it is in; None at the root

region*Regions
Value in"besg""usnv"
Rename a folder
curl -X PATCH 'https://api.stacksync.com/v1/workspaces/0/folders/497f6eca-6276-4993-bfeb-53cbbbba6f08?region=besg' \  -H 'Content-Type: application/json' \  -d '{  "folder_name": "<folder_name>"}'
{  "folder_id": "<folder_id>",  "folder_name": "<folder_name>",  "folder_resource_id": "<folder_resource_id>",  "parent_folder_id": "<parent_folder_id>",  "region": "besg"}