Read Byte Range
curl --request POST \
--url https://api.zerodrive.dev/v1/files/read-bytes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "bin/blob.bin",
"drive_id": "primary",
"offset": 0,
"length": 4096
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: 'bin/blob.bin', drive_id: 'primary', offset: 0, length: 4096})
};
fetch('https://api.zerodrive.dev/v1/files/read-bytes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/read-bytes"
payload = {
"path": "bin/blob.bin",
"drive_id": "primary",
"offset": 0,
"length": 4096
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Read Byte Range
Read up to 64 KiB of binary bytes at an offset as base64 along with file revision and ETag.
POST
https://api.zerodrive.dev
/
v1
/
files
/
read-bytes
Read Byte Range
curl --request POST \
--url https://api.zerodrive.dev/v1/files/read-bytes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "bin/blob.bin",
"drive_id": "primary",
"offset": 0,
"length": 4096
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: 'bin/blob.bin', drive_id: 'primary', offset: 0, length: 4096})
};
fetch('https://api.zerodrive.dev/v1/files/read-bytes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/read-bytes"
payload = {
"path": "bin/blob.bin",
"drive_id": "primary",
"offset": 0,
"length": 4096
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Authorizations
Body
application/json
Response
Base64 bytes, revision, etag, and size
The response is of type object.

