Docs navigation
Files

Stat File

Stat File

GET/v2/tasks/{task_id}/files/stat

**Admission responses.** This endpoint answers four ways when the task has no usable machine. The three 409s are told apart by `detail.code`; a billing refusal is told apart by its HTTP status: - `machine_not_ready` (409, with `Retry-After`) — provisioning is in progress. Retry. - `task_run_busy` (409, with `Retry-After`) — the task holds an active run lease. Retry. - `task_terminal_no_machine` (409, **no** `Retry-After`) — nothing will ever provision this task. Do not retry. - 402 or 429 — the payer was refused by the credit gate. Do not retry; surface the billing error. What `detail` holds on a refusal is described below. `Retry-After` is present on the two retryable 409s and absent on the terminal one, so it is the quick check; `detail.code` is the precise one. Retrying a terminal answer will never succeed. This endpoint is read-only: it never changes the task, and on a credit refusal it returns `{"code": "credits_exhausted", "message": ...}` under `detail` only, with no billing figures.

Path Parameters

task_idstring · uuidrequired

Query Parameters

pathstringrequired
Request
curl --request GET \
  --url https://api.brainbaselabs.com/v2/tasks/{task_id}/files/stat \
  --header 'Authorization: Bearer YOUR_API_KEY'
Response
json
{
  "name": "string",
  "path": "string",
  "is_dir": true,
  "size": 0,
  "mod_time": "string",
  "mode": "string",
  "permissions": "string",
  "owner": "string",
  "group": "string"
}