Create Drive Branch
curl --request POST \
--url https://api.zerodrive.dev/v1/branches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "feat/docs-refresh",
"drive_id": "primary",
"from_branch": "main"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'feat/docs-refresh', drive_id: 'primary', from_branch: 'main'})
};
fetch('https://api.zerodrive.dev/v1/branches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/branches"
payload = {
"name": "feat/docs-refresh",
"drive_id": "primary",
"from_branch": "main"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Create Drive Branch
Create an isolated copy-on-write drive branch from main or another branch.
POST
https://api.zerodrive.dev
/
v1
/
branches
Create Drive Branch
curl --request POST \
--url https://api.zerodrive.dev/v1/branches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "feat/docs-refresh",
"drive_id": "primary",
"from_branch": "main"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'feat/docs-refresh', drive_id: 'primary', from_branch: 'main'})
};
fetch('https://api.zerodrive.dev/v1/branches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/branches"
payload = {
"name": "feat/docs-refresh",
"drive_id": "primary",
"from_branch": "main"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
