Read file contents
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/files/read"
payload = { "path": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/files/read \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>"
}
'{
"content": "<string>",
"encoding": "<string>",
"size": 123
}Files
Read file contents
POST
/
v1
/
machines
/
{id}
/
files
/
read
Read file contents
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/files/read"
payload = { "path": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/files/read \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>"
}
'{
"content": "<string>",
"encoding": "<string>",
"size": 123
}Authorizations
API key passed as Bearer token
Path Parameters
Machine ID (e.g. mch_a1b2c3d4)
Body
application/json
File path to read. Absolute paths may target valid machine locations such as /workspace, /data, /tmp, or /context where present. Relative paths resolve from the machine cwd when set, otherwise from the selected user's home when user is provided, otherwise from /workspace.
Available options:
utf8, base64 Optional machine user for relative-path resolution and ownership.