Read a workspace's usage at vendor cost, itemized
Needs billing.read at the workspace. The usage of the projects in the workspace now, for the billing period, line by line at each vendor's own rate, with the usage fee and the platform fee, which are displayed for transparency: nothing bills them yet. A caller who cannot see the workspace (a member holding no project in it) gets the same 404 as a workspace that does not exist. An API key pinned to a workspace reads that workspace only, with billing.read in its own scopes; any other workspace, in this org or another, gets the same 404. No other API key may call it. 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
Query Parameters
current (the default), the org's billing period now; previous, the one before it.
Value in
- "current"
- "previous"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/orgs/string/workspaces/string/usage/vendor-cost"{ "workspace": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "internal" }, "period": "current", "periodStartsAt": "string", "periodEndsAt": "string", "rateCatalogVersion": "string", "lines": [ { "resource": "compute", "vendor": "string", "region": "string", "quantity": "string", "unit": "machine-hour", "rateUsd": "string", "rateUnit": "machine-hour", "costUsd": "string", "unavailableReason": "region_not_priced" } ], "totalCostUsd": "string", "usageFee": { "scheduleVersion": "string", "percent": "string", "marginPercentMax": "string", "components": [ { "id": "string", "label": "string", "percent": "string", "kind": "pass_through" } ], "amountUsd": "string" }, "platformFeeUsd": "string", "unavailable": [ { "field": "usageFee", "reason": "not_in_force", "message": "string" } ]}List an External workspace's end users with their usage and caps GET
Needs `billing.read`. Every end user with usage in the workspace's projects this billing period, an override, or a notice, by machine-hours descending, with the cap that holds it and whether it reached it. 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. An Internal workspace has no end users: every operation here answers it with 409 `internal_workspace`. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone.
Read a workspace's storage GET
The durable disks of the environments in the workspace's projects, with their forks, checkpoints and last disk samples, from the projects where the caller holds `sandbox.read`. Stored bytes, this month's storage cost and storage backends are not served yet, and are named in `unavailable`. A caller who cannot see the workspace (a member holding no project in it) gets the same 404 as a workspace that does not exist. API keys cannot call it. Off until the workspace API is enabled for this deployment: until then it answers 404 to everyone.