Skip to main content
PUT
/
filesystem
/
tree
/
{path}
Create or update directory tree
curl --request PUT \
  --url https://sbx-{sandbox_id}-{workspace_id}.{region}.bl.run/filesystem/tree/{path} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "files": {
    "\"dir/file2.txt\"": "\"content2\"}",
    "{\"file1.txt\"": "\"content1\""
  }
}
'
{
  "files": [
    {
      "group": "<string>",
      "lastModified": "<string>",
      "name": "<string>",
      "owner": "<string>",
      "path": "<string>",
      "permissions": "<string>",
      "size": 123
    }
  ],
  "name": "<string>",
  "path": "<string>",
  "subdirectories": [
    {
      "name": "<string>",
      "path": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

path
string
required

Root directory path

Body

application/json

Map of file paths to content

files
object
Example:
{
"\"dir/file2.txt\"": "\"content2\"}",
"{\"file1.txt\"": "\"content1\""
}

Response

Updated directory tree

files
object[]
required
name
string
required
path
string
required
subdirectories
object[]
required

@name Subdirectories