Folders
Move resources to the root
Each resource leaves its folder for the root of the workspace. A retry is safe.
Authorization
AuthorizationstringheaderrequiredBearer <key>, where <key> is a workspace API key or a user API key. See Authentication.
workspace_id*integerThe workspace. List the ones your key can reach with GET /v1/workspaces.
region*RegionsRegion of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them
"besg""usnv"application/json- body
resources*array<>1 <= items <= 200validate_only?Validate OnlyRun every check of the move and answer what would move and what would not, with why, without moving anything: a refused request answers the error the move would
falseOK
application/json- response
The outcome of a move: each resource is moved on its own, so some can fail while others move
folder_id*|The destination folder; None for the root
moved*array<>failed*array<>curl -X POST 'https://api.stacksync.com/v1/workspaces/0/folders/root/resources?region=besg' \ -H 'Content-Type: application/json' \ -d '{ "resources": [ { "resource_type": "connection", "resource_id": "3f6c1d2e-8a4b-4c7d-9e21-5b6f7a8c9d01", "region": "besg" } ]}'{ "folder_id": "<folder_id>", "moved": [ { "resource_type": "connection", "resource_id": "<resource_id>", "region": "besg", "resource_name": "<resource_name>", "source_folder_id": "<source_folder_id>" } ], "failed": [ { "resource_type": "connection", "resource_id": "<resource_id>", "region": "besg", "resource_name": "<resource_name>", "source_folder_id": "<source_folder_id>", "msg": "<msg>" } ]}POSTMove resources into a folder
Each resource (from GET .../resources) is filed under the folder; a resource of another region than the folder is not moved. Moving again to the same folder changes nothing, so a retry is safe. With validate_only, the answer tells what would move, without moving anything.
GETList files
The files of the workspace in a region, newest first.