POST /actions/projects/{project_id}/set-file-tree

Define a template file to use for a given project. Template files are located on the server side and each template has a name for selection.

Path parameters

  • project_id string(uuid) Required

    Project unique identifier

application/json

Body Required

  • tree_name string Required

    Name of the file tree template

Responses

  • 200 application/json

    File tree template set successfully

    Hide response attributes Show response attributes object
    • id string(uuid)

      Project unique identifier

    • name string

      Project name

    • file_tree object

      File tree template configuration

    • updated_at string(date-time)

      Last update timestamp

POST /actions/projects/{project_id}/set-file-tree
curl -X POST "http://api.example.com/actions/projects/a24a6ea4-ce75-4665-a070-57453082c25/set-file-tree" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "tree_name": "default"
}'
import requests

url = "http://api.example.com/actions/projects/a24a6ea4-ce75-4665-a070-57453082c25/set-file-tree"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
}
params = {}
payload = {
    "tree_name": "default"
}

response = requests.post(
    url,
    headers=headers,
    params=params,
    json=payload
)

response.raise_for_status()

if response.content:
    print(response.json())
curl \
 --request POST 'http://api.example.com/actions/projects/a24a6ea4-ce75-4665-a070-57453082c25/set-file-tree' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"tree_name":"default"}'
Request examples
{
  "tree_name": "default"
}
Response examples (200)
{
  "id": "b35b7fb5-df86-5776-b181-68564193d36",
  "name": "My Project",
  "file_tree": {
    "template": "default"
  },
  "updated_at": "2023-01-01T12:30:00Z"
}