Upload raw bytes to a file
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/file"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)curl --request PUT \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/file \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '"<string>"'Files
Upload raw bytes to a file
Streams the request body directly into the destination path.
PUT
/
v1
/
machines
/
{id}
/
file
Upload raw bytes to a file
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/file"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)curl --request PUT \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/file \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '"<string>"'Authorizations
API key passed as Bearer token
Path Parameters
Machine ID (e.g. mch_a1b2c3d4)
Query Parameters
File path inside the machine. 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.
Optional machine user for relative-path resolution and ownership.
Body
application/octet-stream
The body is of type file.
Response
204
File uploaded