curl --request DELETE \
--url https://davinci-app.com/api/v2/projects/{projectId}/branches/{branch} \
--header 'Authorization: Bearer <token>'import os
from davinci_sdk import DavinciClient
with DavinciClient(api_key=os.environ["DAVINCI_API_KEY"]) as client:
client.branches.delete(project_id, "thermal-study")
import { DavinciClient } from '@celedon/davinci-sdk';
const client = new DavinciClient({
apiKey: process.env.DAVINCI_API_KEY!,
});
await client.branches.delete(projectId, 'thermal-study');
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/projects/{projectId}/branches/{branch}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"deleted": "<string>",
"disconnectedUsers": 1
}{
"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": {}
}
}{
"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": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Delete a branch
Deletes a branch and the commits only it holds. There is no undo, which is
why this asks for projects:manage where creating a branch asks for
projects:write.
Refused with BRANCH_IN_USE while anyone is connected to the branch. Pass
force=true to disconnect them instead; their in-memory work is saved to the
branch first, and then goes with it.
main cannot be deleted.
curl --request DELETE \
--url https://davinci-app.com/api/v2/projects/{projectId}/branches/{branch} \
--header 'Authorization: Bearer <token>'import os
from davinci_sdk import DavinciClient
with DavinciClient(api_key=os.environ["DAVINCI_API_KEY"]) as client:
client.branches.delete(project_id, "thermal-study")
import { DavinciClient } from '@celedon/davinci-sdk';
const client = new DavinciClient({
apiKey: process.env.DAVINCI_API_KEY!,
});
await client.branches.delete(projectId, 'thermal-study');
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://davinci-app.com/api/v2/projects/{projectId}/branches/{branch}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"deleted": "<string>",
"disconnectedUsers": 1
}{
"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": {}
}
}{
"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": {}
}
}{
"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.
Path Parameters
Project id. May be compound in the form {projectId}--{branchName}.
1Branch name.
1Query Parameters
Disconnect anyone using the branch instead of refusing.