Batch File Operations
curl --request POST \
--url https://api.zerodrive.dev/v1/files/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operations": [
{
"path": "<string>",
"source": "<string>",
"destination": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({operations: [{path: '<string>', source: '<string>', destination: '<string>'}]})
};
fetch('https://api.zerodrive.dev/v1/files/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/batch"
payload = { "operations": [
{
"path": "<string>",
"source": "<string>",
"destination": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Batch File Operations
Execute up to 50 move, copy, and delete operations in one request. The operations run one after the other (not atomically) and the answer has one result per operation, in order. A move row carries shares_followed (and replaced true when a file was replaced); a folder of more than 200 files is an error row and moves nothing: move it with /v1/files/move.
POST
https://api.zerodrive.dev
/
v1
/
files
/
batch
Batch File Operations
curl --request POST \
--url https://api.zerodrive.dev/v1/files/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operations": [
{
"path": "<string>",
"source": "<string>",
"destination": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({operations: [{path: '<string>', source: '<string>', destination: '<string>'}]})
};
fetch('https://api.zerodrive.dev/v1/files/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/batch"
payload = { "operations": [
{
"path": "<string>",
"source": "<string>",
"destination": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
