import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/files/upload-url"
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/upload-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>"
}
'{
"url": "<string>",
"token": "<string>"
}Get a direct upload URL
Returns a machine-scoped authenticated URL for uploading a single file.
Upload with multipart POST using a file field, or stream raw bytes
with PUT to the returned URL.
The URL contains a short-lived file transfer token scoped to the target
machine path. The compatibility token field returns the same scoped
token for clients that still expect a separate token property.
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/files/upload-url"
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/upload-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>"
}
'{
"url": "<string>",
"token": "<string>"
}Authorizations
API key passed as Bearer token
Path Parameters
Machine ID (e.g. mch_a1b2c3d4)
Body
Machine path to target. 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.