List directory contents
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/files \
--header 'Authorization: Bearer <token>'[
{
"name": "<string>",
"path": "<string>",
"is_dir": true,
"size": 123,
"type": "file",
"mode": "0644",
"permissions": "0644",
"owner": "<string>",
"group": "<string>",
"modified_time": "2023-11-07T05:31:56Z",
"symlink_target": "<string>"
}
]Files
List directory contents
GET
/
v1
/
machines
/
{id}
/
files
List directory contents
import requests
url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.13-215-85-171.sslip.io/v1/machines/{id}/files \
--header 'Authorization: Bearer <token>'[
{
"name": "<string>",
"path": "<string>",
"is_dir": true,
"size": 123,
"type": "file",
"mode": "0644",
"permissions": "0644",
"owner": "<string>",
"group": "<string>",
"modified_time": "2023-11-07T05:31:56Z",
"symlink_target": "<string>"
}
]Authorizations
API key passed as Bearer token
Path Parameters
Machine ID (e.g. mch_a1b2c3d4)
Query Parameters
Directory path to list 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 recursion depth for nested directory listings.
Required range:
x >= 1Optional machine user for relative-path resolution and ownership.
Response
200 - application/json
Directory listing
Absolute resolved filesystem path. For machine routes this is an absolute machine path; for volume routes this is an absolute volume-internal path rooted at /.
Entry type (e.g. "file", "directory", "symlink")
Example:
"file"
Example:
"0644"
Example:
"0644"