API ReferenceCostscosts
Read workspace costs
GET /api/workspaces/{workspaceId}/costs
Endpoint
GET
/api/workspaces/{workspaceId}/costsInspect cost totals, coverage and breakdown for the requested window. This is a repeatable read. See usage_readWorkspaceUsage. Required personal key scopes: workspace:view, workspace:edit.
Authorization
Bearer token · workspace:view · workspace:edit
Parameters
workspaceIdpath · uuid · required- Workspace UUID returned by list workspaces.
fromquery · string · optional- Start of the requested reporting interval.
toquery · string · optional- End of the requested reporting interval.
granularityquery · string · optional- Time unit for grouping observations into buckets. Allowed values: day, month
API-Versionheader · string · optional- Optional platform API major version. Omit to use the current default. Allowed values: 1
Responses
200 Success
application/json schema
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"description": "Workspace UUID returned by list workspaces."
},
"window": {
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Start of the requested reporting interval."
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "End of the requested reporting interval."
},
"granularity": {
"type": "string",
"enum": [
"day",
"month"
],
"description": "Time unit for grouping observations into buckets."
},
"timeZone": {
"type": "string",
"enum": [
"UTC"
],
"description": "Time zone used to group the reporting period."
}
},
"required": [
"from",
"to",
"granularity",
"timeZone"
],
"additionalProperties": false,
"description": "Reporting interval used to aggregate observations."
},
"currency": {
"type": "string",
"enum": [
"USD"
],
"description": "Currency code for the monetary values in this report."
},
"totals": {
"type": "object",
"properties": {
"amount": {
"type": "string",
"pattern": "^-?\\d+\\.\\d{2}$",
"description": "Quantity or monetary amount in the stated unit."
},
"estimated": {
"type": "string",
"pattern": "^-?\\d+\\.\\d{2}$",
"description": "Portion of cost based on estimates."
}
},
"required": [
"amount",
"estimated"
],
"additionalProperties": false,
"description": "Aggregates over all entries in the selected scope."
},
"series": {
"type": "array",
"items": {
"type": "object",
"properties": {
"period": {
"type": "string",
"description": "`YYYY-MM-DD` for daily windows, `YYYY-MM` for monthly ones."
},
"item": {
"type": "string",
"enum": [
"warehouse.storage",
"warehouse.compute",
"pipelines.compute",
"pipelines.builds",
"events.collection",
"database.compute",
"database.storage",
"blob.storage",
"agent.models",
"agent.browsers",
"app.hosting",
"network",
"other"
],
"description": "Product item to which the usage or cost belongs."
},
"amount": {
"type": "string",
"pattern": "^-?\\d+\\.\\d{2}$",
"description": "Quantity or monetary amount in the stated unit."
},
"basis": {
"type": "string",
"enum": [
"invoice",
"estimate"
],
"description": "Source used to rate or estimate the charge."
}
},
"required": [
"period",
"item",
"amount",
"basis"
],
"additionalProperties": false
},
"description": "Observations indexed by time or reporting period."
},
"breakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"group": {
"type": "string",
"enum": [
"warehouse",
"pipelines",
"events",
"database",
"agent",
"app",
"network",
"other"
],
"description": "Group to which this item belongs."
},
"item": {
"type": "string",
"enum": [
"warehouse.storage",
"warehouse.compute",
"pipelines.compute",
"pipelines.builds",
"events.collection",
"database.compute",
"database.storage",
"blob.storage",
"agent.models",
"agent.browsers",
"app.hosting",
"network",
"other"
],
"description": "Product item to which the usage or cost belongs."
},
"amount": {
"type": "string",
"pattern": "^-?\\d+\\.\\d{2}$",
"description": "Quantity or monetary amount in the stated unit."
},
"basis": {
"type": "string",
"enum": [
"invoice",
"estimate",
"mixed"
],
"description": "Source used to rate or estimate the charge."
},
"usage": {
"type": "object",
"properties": {
"amount": {
"type": "string",
"description": "Quantity or monetary amount in the stated unit."
},
"unit": {
"type": "string",
"description": "Unit used to interpret the reported quantity."
}
},
"required": [
"amount",
"unit"
],
"additionalProperties": false,
"description": "Present only when every line of the item shares one usage unit."
}
},
"required": [
"group",
"item",
"amount",
"basis"
],
"additionalProperties": false
},
"description": "Totals split by reporting category."
},
"coverage": {
"type": "array",
"items": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string",
"enum": [
"warehouse.storage",
"warehouse.compute",
"pipelines.compute",
"pipelines.builds",
"events.collection",
"database.compute",
"database.storage",
"blob.storage",
"agent.models",
"agent.browsers",
"app.hosting",
"network",
"other"
]
},
"description": "Entries included in this result."
},
"state": {
"type": "string",
"enum": [
"collected",
"not_configured",
"not_collected"
],
"description": "Current state reported by the service."
},
"collectedThrough": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Latest date for which usage collection is complete."
},
"basis": {
"type": "string",
"enum": [
"invoice",
"estimate"
],
"description": "Source used to rate or estimate the charge."
}
},
"required": [
"items",
"state"
],
"additionalProperties": false
},
"description": "Collection status for the cost items in the response."
},
"access": {
"type": "object",
"properties": {
"resourceId": {
"type": "string",
"description": "Identifier of the resource."
},
"resourceType": {
"type": "string",
"enum": [
"workspace",
"application",
"repository",
"connection",
"secret",
"warehouse",
"ontology",
"ontology_entity",
"semantic_model",
"pipeline",
"job",
"asset",
"schedule",
"event_stream",
"agent"
],
"description": "Type of platform resource to which the observation applies."
},
"generation": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "Generation of the resource or deployment being observed."
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Permission observations or grants applicable to this subject."
},
"complete": {
"type": "boolean",
"description": "Whether the result covers all entries in its scope."
},
"observedAt": {
"type": "string",
"description": "Time when the item was observed."
}
},
"required": [
"resourceId",
"resourceType",
"generation",
"permissions",
"complete",
"observedAt"
],
"additionalProperties": false,
"description": "Permissions observed for this resource when the server handled the request."
}
},
"required": [
"workspaceId",
"window",
"currency",
"totals",
"series",
"breakdown",
"coverage",
"access"
],
"additionalProperties": false
}Full schema and referenced types ↗Example
{
"workspaceId": "00000000-0000-4000-8000-000000000001",
"window": {
"from": "2026-11-01",
"to": "2026-11-15",
"granularity": "day",
"timeZone": "UTC"
},
"currency": "USD",
"totals": {
"amount": "0.00",
"estimated": "0.00"
},
"series": [],
"breakdown": [],
"coverage": [],
"access": {
"resourceId": "00000000-0000-4000-8000-000000000001",
"resourceType": "workspace",
"generation": 1,
"permissions": [],
"complete": false,
"observedAt": "2026-01-15T12:00:00Z"
}
}Response headers
- API-Version
- Supported platform API major version.
- RateLimit
- Remaining quota (r) and seconds until reset (t), when admission is available.
- RateLimit-Policy
- Request quota (q) and window in seconds (w).
- Deprecation
- Present when the operation is deprecated. RFC 9745 date in seconds since the Unix epoch.
- Sunset
- Present when retirement is scheduled. HTTP date of planned removal, per RFC 8594.
400 Error
application/json schema
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Machine-readable error code or diagnostic reported by the operation."
},
"detail": {
"type": "string",
"description": "Human-readable explanation of the failure."
},
"requestId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Correlation ID for tracing the request with support."
},
"retryable": {
"type": "boolean",
"description": "Whether retrying the same failed request may succeed."
}
},
"required": [
"error",
"detail",
"requestId",
"retryable"
],
"additionalProperties": true
}Full schema and referenced types ↗Response headers
- API-Version
- Supported platform API major version.
- RateLimit
- Remaining quota (r) and seconds until reset (t), when admission is available.
- RateLimit-Policy
- Request quota (q) and window in seconds (w).
401 Error
application/json schema
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Machine-readable error code or diagnostic reported by the operation."
},
"detail": {
"type": "string",
"description": "Human-readable explanation of the failure."
},
"requestId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Correlation ID for tracing the request with support."
},
"retryable": {
"type": "boolean",
"description": "Whether retrying the same failed request may succeed."
}
},
"required": [
"error",
"detail",
"requestId",
"retryable"
],
"additionalProperties": true
}Full schema and referenced types ↗Response headers
- API-Version
- Supported platform API major version.
- RateLimit
- Remaining quota (r) and seconds until reset (t), when admission is available.
- RateLimit-Policy
- Request quota (q) and window in seconds (w).
403 Error
application/json schema
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Machine-readable error code or diagnostic reported by the operation."
},
"detail": {
"type": "string",
"description": "Human-readable explanation of the failure."
},
"requestId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Correlation ID for tracing the request with support."
},
"retryable": {
"type": "boolean",
"description": "Whether retrying the same failed request may succeed."
}
},
"required": [
"error",
"detail",
"requestId",
"retryable"
],
"additionalProperties": true
}Full schema and referenced types ↗Response headers
- API-Version
- Supported platform API major version.
- RateLimit
- Remaining quota (r) and seconds until reset (t), when admission is available.
- RateLimit-Policy
- Request quota (q) and window in seconds (w).
404 Error
application/json schema
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Machine-readable error code or diagnostic reported by the operation."
},
"detail": {
"type": "string",
"description": "Human-readable explanation of the failure."
},
"requestId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Correlation ID for tracing the request with support."
},
"retryable": {
"type": "boolean",
"description": "Whether retrying the same failed request may succeed."
}
},
"required": [
"error",
"detail",
"requestId",
"retryable"
],
"additionalProperties": true
}Full schema and referenced types ↗Response headers
- API-Version
- Supported platform API major version.
- RateLimit
- Remaining quota (r) and seconds until reset (t), when admission is available.
- RateLimit-Policy
- Request quota (q) and window in seconds (w).
406 Unsupported platform API version
application/json schema
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Machine-readable error code or diagnostic reported by the operation."
},
"detail": {
"type": "string",
"description": "Human-readable explanation of the failure."
},
"requestId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Correlation ID for tracing the request with support."
},
"retryable": {
"type": "boolean",
"description": "Whether retrying the same failed request may succeed."
}
},
"required": [
"error",
"detail",
"requestId",
"retryable"
],
"additionalProperties": true
}Full schema and referenced types ↗Response headers
- API-Version
- Supported platform API major version.
- RateLimit
- Remaining quota (r) and seconds until reset (t), when admission is available.
- RateLimit-Policy
- Request quota (q) and window in seconds (w).
409 Error
application/json schema
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Machine-readable error code or diagnostic reported by the operation."
},
"detail": {
"type": "string",
"description": "Human-readable explanation of the failure."
},
"requestId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Correlation ID for tracing the request with support."
},
"retryable": {
"type": "boolean",
"description": "Whether retrying the same failed request may succeed."
}
},
"required": [
"error",
"detail",
"requestId",
"retryable"
],
"additionalProperties": true
}Full schema and referenced types ↗Response headers
- API-Version
- Supported platform API major version.
- RateLimit
- Remaining quota (r) and seconds until reset (t), when admission is available.
- RateLimit-Policy
- Request quota (q) and window in seconds (w).
429 Request limit reached
application/json schema
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Machine-readable error code or diagnostic reported by the operation."
},
"detail": {
"type": "string",
"description": "Human-readable explanation of the failure."
},
"requestId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Correlation ID for tracing the request with support."
},
"retryable": {
"type": "boolean",
"description": "Whether retrying the same failed request may succeed."
}
},
"required": [
"error",
"detail",
"requestId",
"retryable"
],
"additionalProperties": true
}Full schema and referenced types ↗Response headers
- Retry-After
- Seconds to wait before retrying the request.
- API-Version
- Supported platform API major version.
- RateLimit
- Remaining quota (r) and seconds until reset (t), when admission is available.
- RateLimit-Policy
- Request quota (q) and window in seconds (w).
500 Error
application/json schema
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Machine-readable error code or diagnostic reported by the operation."
},
"detail": {
"type": "string",
"description": "Human-readable explanation of the failure."
},
"requestId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Correlation ID for tracing the request with support."
},
"retryable": {
"type": "boolean",
"description": "Whether retrying the same failed request may succeed."
}
},
"required": [
"error",
"detail",
"requestId",
"retryable"
],
"additionalProperties": true
}Full schema and referenced types ↗Response headers
- API-Version
- Supported platform API major version.
- RateLimit
- Remaining quota (r) and seconds until reset (t), when admission is available.
- RateLimit-Policy
- Request quota (q) and window in seconds (w).
503 Error
application/json schema
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Machine-readable error code or diagnostic reported by the operation."
},
"detail": {
"type": "string",
"description": "Human-readable explanation of the failure."
},
"requestId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid",
"description": "Correlation ID for tracing the request with support."
},
"retryable": {
"type": "boolean",
"description": "Whether retrying the same failed request may succeed."
}
},
"required": [
"error",
"detail",
"requestId",
"retryable"
],
"additionalProperties": true
}Full schema and referenced types ↗Response headers
- API-Version
- Supported platform API major version.
- RateLimit
- Remaining quota (r) and seconds until reset (t), when admission is available.
- RateLimit-Policy
- Request quota (q) and window in seconds (w).