Business Metrics
List business metrics
Returns a workspace's business metrics.
Needs a token with viewCostReports on the workspace.
query Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredpageThe page to return, counted from 1. A page below 1 reads page 1; one past the last returns no items.
limitItems per page, from 1 to 100. A larger value is clamped to 100, a smaller one to 1.
List business metrics › Responses
Success
Create business metric
Creates a business metric whose daily values a cost report divides cost by. A workspace holds a bounded number of metrics: past it, the request is refused with 422 limit_exceeded.
Needs a token with manageBusinessMetrics on the workspace.
Headers
Idempotency-KeyA unique value, at most 255 printable ASCII characters, such as a UUID, that makes retrying this create safe. A retry with the same key and the same request within 24 hours answers the first response again, marked Idempotent-Replayed: true, and creates nothing; the same key with another request answers 422 idempotency_key_reused. A key is kept only for a create that succeeded. Without it, every request creates.
Create business metric › Request Body
workspaceId^wsp_[A-Za-z0-9_-]{2… · requirednameunitlabelColumnsCreate business metric › Responses
Created
id^bmt_[A-Za-z0-9_-]{2… · requirednameunitlabelColumnscreatedAtupdatedAtGet business metric
Returns one business metric.
Needs a token with viewCostReports on the workspace.
path Parameters
metricId^bmt_[A-Za-z0-9_-]{2… · requiredquery Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredGet business metric › Responses
Success
id^bmt_[A-Za-z0-9_-]{2… · requirednameunitlabelColumnscreatedAtupdatedAtUpdate business metric
Renames a business metric or its unit; its label columns stay.
Needs a token with manageBusinessMetrics on the workspace.
path Parameters
metricId^bmt_[A-Za-z0-9_-]{2… · requiredquery Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredHeaders
If-MatchApplies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.
Update business metric › Responses
Success
id^bmt_[A-Za-z0-9_-]{2… · requirednameunitlabelColumnscreatedAtupdatedAtDelete business metric
Deletes a business metric and its values; a report charting its unit cost goes back to cost alone.
Needs a token with manageBusinessMetrics on the workspace.
path Parameters
metricId^bmt_[A-Za-z0-9_-]{2… · requiredquery Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredHeaders
If-MatchApplies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.
Delete business metric › Responses
No Content
List business metric values
Returns a business metric's values between two days, both included, by day.
Needs a token with viewCostReports on the workspace.
path Parameters
metricId^bmt_[A-Za-z0-9_-]{2… · requiredquery Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredstartDateThe first day listed, included. Omitted, the listing starts at the earliest value.
endDateThe last day listed, included. Omitted, the listing ends at the latest value.
pageThe page to return, counted from 1. A page below 1 reads page 1; one past the last returns no items.
limitItems per page, from 1 to 1000. A larger value is clamped to 1000, a smaller one to 1.
List business metric values › Responses
Success
Import business metric values
Stores dated values, each replacing the amount the metric holds for its day and labels, so a repeated request changes nothing. An organization stores a bounded number of values across all its metrics: a request that would add past it is refused whole with 422 limit_exceeded, and one that only replaces stored values always passes.
Needs a token with manageBusinessMetrics on the workspace.
path Parameters
metricId^bmt_[A-Za-z0-9_-]{2… · requiredquery Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredImport business metric values › Responses
Success
createdupdatedunchanged