curl --request GET \
--url https://davinci-app.com/api/v2/projects \
--header 'Authorization: Bearer <token>'import os
from davinci_sdk import DavinciClient
with DavinciClient(api_key=os.environ["DAVINCI_API_KEY"]) as client:
result = client.projects.list()
for project in [*result.owned, *result.shared]:
print(project.id, project.name, project.in_use)
import { DavinciClient } from '@celedon/davinci-sdk';
const client = new DavinciClient({
apiKey: process.env.DAVINCI_API_KEY!,
});
const { owned, shared } = await client.projects.list();
for (const project of [...owned, ...shared]) {
console.log(project.id, project.name, project.inUse);
}
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/projects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"owned": [
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"owner": "<string>",
"createdBy": "<string>",
"visibility": "<string>",
"version": "<string>",
"created": "2023-11-07T05:31:56Z",
"lastModified": "2023-11-07T05:31:56Z",
"storageUsedBytes": 1,
"transferState": "<string>",
"collaborators": [
"<string>"
],
"pendingCollaborators": [
"<string>"
],
"inUse": true,
"activeBranch": "<string>"
}
],
"shared": [
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"owner": "<string>",
"createdBy": "<string>",
"visibility": "<string>",
"version": "<string>",
"created": "2023-11-07T05:31:56Z",
"lastModified": "2023-11-07T05:31:56Z",
"storageUsedBytes": 1,
"transferState": "<string>",
"collaborators": [
"<string>"
],
"pendingCollaborators": [
"<string>"
],
"inUse": true,
"activeBranch": "<string>"
}
]
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}List accessible projects
Returns the caller’s projects split into owned and shared. Each entry
carries an inUse flag and the most recently active running branch
associated with the caller. Clients should use main when activeBranch
is null.
curl --request GET \
--url https://davinci-app.com/api/v2/projects \
--header 'Authorization: Bearer <token>'import os
from davinci_sdk import DavinciClient
with DavinciClient(api_key=os.environ["DAVINCI_API_KEY"]) as client:
result = client.projects.list()
for project in [*result.owned, *result.shared]:
print(project.id, project.name, project.in_use)
import { DavinciClient } from '@celedon/davinci-sdk';
const client = new DavinciClient({
apiKey: process.env.DAVINCI_API_KEY!,
});
const { owned, shared } = await client.projects.list();
for (const project of [...owned, ...shared]) {
console.log(project.id, project.name, project.inUse);
}
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/projects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"owned": [
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"owner": "<string>",
"createdBy": "<string>",
"visibility": "<string>",
"version": "<string>",
"created": "2023-11-07T05:31:56Z",
"lastModified": "2023-11-07T05:31:56Z",
"storageUsedBytes": 1,
"transferState": "<string>",
"collaborators": [
"<string>"
],
"pendingCollaborators": [
"<string>"
],
"inUse": true,
"activeBranch": "<string>"
}
],
"shared": [
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"owner": "<string>",
"createdBy": "<string>",
"visibility": "<string>",
"version": "<string>",
"created": "2023-11-07T05:31:56Z",
"lastModified": "2023-11-07T05:31:56Z",
"storageUsedBytes": 1,
"transferState": "<string>",
"collaborators": [
"<string>"
],
"pendingCollaborators": [
"<string>"
],
"inUse": true,
"activeBranch": "<string>"
}
]
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Personal access token. The scopes granted at issuance determine both which
operations the key may call and the ceiling on the resource permissions it
can exercise. Each scope family is a ladder: projects:manage implies
projects:write and projects:read; cards:manage implies cards:write
and cards:read; and teams:manage implies teams:write and teams:read.
These are named API capability bundles, not blanket domain roles:
manage exposes only the permissions enumerated for that scope and never
bypasses the acting user's current role-based access.
Response
The caller's owned and shared projects.
Hide child attributes
Hide child attributes
User id or organization id that owns the project.
x >= 0User ids with effective access, including access inherited from an organization.
True when a Design Engine instance is currently running for this project.
Most recently active running branch associated with the caller, or null.
Hide child attributes
Hide child attributes
User id or organization id that owns the project.
x >= 0User ids with effective access, including access inherited from an organization.
True when a Design Engine instance is currently running for this project.
Most recently active running branch associated with the caller, or null.