Atomic Structured File Patch
curl --request POST \
--url https://api.zerodrive.dev/v1/primitives/patch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"operations": [
{}
],
"expected_revision": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '<string>', operations: [{}], expected_revision: 123})
};
fetch('https://api.zerodrive.dev/v1/primitives/patch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/primitives/patch"
payload = {
"path": "<string>",
"operations": [{}],
"expected_revision": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Atomic Structured File Patch
Patch JSON, JSONL, CSV, Markdown, or YAML files atomically with optional optimistic concurrency.
POST
https://api.zerodrive.dev
/
v1
/
primitives
/
patch
Atomic Structured File Patch
curl --request POST \
--url https://api.zerodrive.dev/v1/primitives/patch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"operations": [
{}
],
"expected_revision": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '<string>', operations: [{}], expected_revision: 123})
};
fetch('https://api.zerodrive.dev/v1/primitives/patch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/primitives/patch"
payload = {
"path": "<string>",
"operations": [{}],
"expected_revision": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}
