Get workspace usage

OpenAPI contract

Method
GET
Path
/api/v1/workspaces/{id}/usage
Security
jwtBearer (bearer)
Response status
200 400 401 403 404 409 429 500
Request and response schemas
JSON
{
  "requestBody": {},
  "responses": {
    "200": {
      "description": "Workspace usage",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/WorkspaceUsageResponse"
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/RequestError"
        }
      }
    },
    "401": {
      "description": "Authentication required or invalid",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "403": {
      "description": "Authenticated but not permitted",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "404": {
      "description": "Requested workspace resource was not found",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "409": {
      "description": "Request conflicts with current workspace state",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "429": {
      "description": "Rate limit exceeded",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "500": {
      "description": "Unexpected server error",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

GET /api/v1/workspaces/{id}/usage is JWT-only and requires usage:read for the workspace. It returns lifetime NCU attributed to that workspace: finalized usage, current reservations, refunds, and the organization billing owner's remaining wallet balance. limitNcu is null because workspace-specific limits are not available in this release.

The projects, people, and apiKeys arrays break usage and reservations down by attribution ID and display name. Deleted keys remain identifiable as deleted, and builds without a project are grouped as unprojected. The endpoint does not accept a date range and does not expose a workspace outside the caller's collaboration boundary.

http
GET /api/v1/workspaces/{id}/usage
Authorization: Bearer <access token>