cURL
curl --request GET \
--url https://davinci-app.com/api/v2/programmatic/projects/{projectId}/tree \
--header 'Authorization: Bearer <token>'import os
from davinci_sdk import DavinciClient
with DavinciClient(api_key=os.environ["DAVINCI_API_KEY"]) as client:
tree = client.projects.get_tree("project-id", branch="main")
print(len(tree.tree))import { DavinciClient } from '@celedon/davinci-sdk';
const client = new DavinciClient({
apiKey: process.env.DAVINCI_API_KEY!,
});
const tree = await client.projects.getTree('project-id', { branch: 'main' });
console.log(tree.tree.length);const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/programmatic/projects/{projectId}/tree', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": {
"tree": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"parent": "<string>",
"childrenCount": 1
}
],
"objectCount": 1
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Projects
Get project tree
Auto-acquires a Design Engine instance, then returns a flat tree of project objects.
GET
https://davinci-app.com
/
api
/
v2
/
programmatic
/
projects
/
{projectId}
/
tree
cURL
curl --request GET \
--url https://davinci-app.com/api/v2/programmatic/projects/{projectId}/tree \
--header 'Authorization: Bearer <token>'import os
from davinci_sdk import DavinciClient
with DavinciClient(api_key=os.environ["DAVINCI_API_KEY"]) as client:
tree = client.projects.get_tree("project-id", branch="main")
print(len(tree.tree))import { DavinciClient } from '@celedon/davinci-sdk';
const client = new DavinciClient({
apiKey: process.env.DAVINCI_API_KEY!,
});
const tree = await client.projects.getTree('project-id', { branch: 'main' });
console.log(tree.tree.length);const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/programmatic/projects/{projectId}/tree', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": {
"tree": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"parent": "<string>",
"childrenCount": 1
}
],
"objectCount": 1
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Personal access token. Programmatic reads require the projects:read scope.
Path Parameters
Project id. May be compound in the form {projectId}--{branchName}.
Minimum string length:
1Query Parameters
Response
Project tree.
⌘I