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

Folders

Get the folder tree

GET
/v1/workspaces/{workspace_id}/folders/tree

Every folder of the workspace in one region, nested under its parent, as the web app's sidebar shows it.

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.

Query Parameters

region*Regions

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

Value in"besg""usnv"

Response Body

OK

application/json
  1. response

Every folder of the workspace in one region, nested under its parent

region*Regions
Value in"besg""usnv"
folders*array<>

The folders at the root, each with its sub-folders

Get the folder tree
curl -X GET 'https://api.stacksync.com/v1/workspaces/0/folders/tree?region=besg'
{  "region": "besg",  "folders": [    {      "folder_id": "<folder_id>",      "folder_name": "<folder_name>",      "folders": []    }  ]}