Get Kubernetes workload cost over time

Returns a cost time series grouped by dimension: the top limit values by cost, each as
its own series, plus one "Others" series that sums the rest. Use this for trends and charts
("daily cost of the top 5 namespaces last month"). Use queryAttributeWorkloadsTable for
rows with totals per value, and queryAttributeWorkloadsStats for one total.

The request body holds the filters; this operation only reads data.

Freemium customers (no paid Attribute plan) see network cost only, and only for the last
60 days.

Authenticate with Authorization: Bearer <token>. Omit X-Tenant-Id when the credential
resolves to one customer. When the credential can act on several customers, send
X-Tenant-Id: <tenant-id> to select one.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
enum
required

What one row (or one series) stands for:

  • workload: one Kubernetes workload on one cluster. Only these rows carry workloadId,
    the input of the /attribute/v1/workloads/w/* operations.
  • workloadName: all workloads with the same name, across clusters.
  • workloadType: one workload type.
  • namespace: one Kubernetes namespace.
  • platform: one cluster (name, type, region, account and cloud).
  • accountId: one cloud account that hosts clusters.
  • resource: one billed cloud resource used by workloads.
  • resourceType: one billed service.
  • costDescription: one billing SKU description.
  • platformCloudProvider: one cloud that clusters run on.
Query Params
date
required

First day of the date range (UTC), inclusive, as YYYY-MM-DD. The change fields compare
with the period of the same length right before this day. Freemium customers (no paid
Attribute plan) can only read the last 60 days: a from earlier than today minus 60 days
(UTC) returns 403.

date
required

Last day of the date range (UTC), inclusive, as YYYY-MM-DD. Must be on or after from.

integer
≥ 1
Defaults to 10

Number of series to return, the highest cost first. Default 10. The cost of all other values
is summed into one more "Others" series.

string
enum
Defaults to day

Size of each time bucket. Default day. Use hour only for ranges of a few days; Azure
data has one point per day even with hour.

Allowed:
boolean
Defaults to false

When true, uses hour buckets whatever granularity says. Default false.

string
enum

Keeps only the workloads of one "needs attention" list from getAttributeWorkloadsSignals:
spike, new or network. The lists use their own fixed windows, not from and to;
from and to still decide which cost is shown. When the list is empty, no rows match.
Omit it to read all workloads.

Allowed:
Body Params
filterConditions
required

The filters, as an object with exactly one key: and (every item must match) or or (at
least one item must match). Each item is a condition or a group of conditions. Send
{"and": []} for no filter.

Headers
string

Customer (tenant) ID for the request. This is separate from authentication: you still pass your personal or service account API token in the Authorization header (Bearer <token>). See Get Started.

When to omit (most callers): If your personal or service account token belongs to a single customer, omit this header. The API resolves that customer from the token.

When to send: If your credential can access more than one customer, set X-Tenant-Id to the customer ID you want to act on. A service account can select an active direct or nested descendant of its home customer; the endpoint's normal permissions, entitlements, and resource-ownership checks still apply. A service-account target outside that customer subtree returns 403 Forbidden. Prefer this header over the legacy customerContext query parameter, which only applies to legacy API keys and is ignored by personal and service account tokens.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json