Read a workspace's machine-hour limit and its usage
Needs billing.read. The workspace's cap on billable machine-hours this billing period, beside the org's and each project's, and what its projects have used. Sandbox create and wake check the org's cap, then the workspace's, then the project's. An API key may call it; a key pinned to a workspace only for its own, and any other workspace answers it the same 404 as one that does not exist. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone.
Authorization
bearerAuth A RemoteHost API key (rh_sk_...) or a user session token.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/orgs/string/workspaces/string/usage-guardrails"{ "workspace": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "internal" }, "usageGuardrails": { "sandboxMachineHourLimit": 0 }, "periodStartsAt": "string", "periodEndsAt": "string", "usedMachineHours": 0, "remainingMachineHours": 0, "usageAlert": { "percentUsed": 0, "status": "string", "message": "string" }}Delete an empty workspace DELETE
Needs `workspaces.manage`. Only a workspace with no projects (409 `workspace_not_empty` otherwise; never a cascade) that is not one of the org's defaults. External workspaces an Internal one managed are kept, their `manager_workspace_id` cleared. Audited. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone. API keys cannot call it yet.
Set a workspace's machine-hour limit PATCH
Needs `billing.manage`. Null removes the workspace's cap. API keys cannot call it. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone.