Read File with Slicing
curl --request POST \
--url https://api.zerodrive.dev/v1/files/read \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"head": 123,
"tail": 123,
"lines": "<string>",
"encoding": "utf-8"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '<string>', head: 123, tail: 123, lines: '<string>', encoding: 'utf-8'})
};
fetch('https://api.zerodrive.dev/v1/files/read', 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"
payload = {
"path": "<string>",
"head": 123,
"tail": 123,
"lines": "<string>",
"encoding": "utf-8"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Read File with Slicing
Read text contents with optional line range slicing (head/tail/lines) or retrieve binary metadata and download URL.
POST
https://api.zerodrive.dev
/
v1
/
files
/
read
Read File with Slicing
curl --request POST \
--url https://api.zerodrive.dev/v1/files/read \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"head": 123,
"tail": 123,
"lines": "<string>",
"encoding": "utf-8"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '<string>', head: 123, tail: 123, lines: '<string>', encoding: 'utf-8'})
};
fetch('https://api.zerodrive.dev/v1/files/read', 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"
payload = {
"path": "<string>",
"head": 123,
"tail": 123,
"lines": "<string>",
"encoding": "utf-8"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Body
application/json
Response
200
File content retrieved

