List Kubernetes workload costs by dimension

Returns one page of rows of Kubernetes workload cost, grouped by dimension, for a date
range. Each row has its cost, its change against the previous period of the same length,
and the related values for that dimension (for example the clusters and accounts of a
namespace). Use this for granular rows ("top 10 workloads by cost", "which namespaces grew").
Use queryAttributeWorkloadsStats for totals and the total row count, and
queryAttributeWorkloadsOverTime for a time series. Rows of the workload dimension carry a
workloadId: pass it to the /attribute/v1/workloads/w/* operations to see that one
workload's cloud resources.

The request body holds the filters; this operation only reads data. Build filter values
with listAttributeWorkloadsFilterValues.

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

Rows per page. Default 10. The server sets no maximum, so ask only for what you need
(100 or less keeps the response small).

integer
≥ 0
Defaults to 0

Number of rows to skip. Default 0. For the next page, send offset plus limit. A page with
fewer than limit rows is the last page.

string

Sort order, as a JSON object {"field": "<field>", "order": "asc" | "desc"} (URL-encode it).
Default {"field":"cost","order":"desc"}. field is one of: cost, change (percent),
dollarChange, name, type, namespace, platform_name, platform_region, accountId,
platformCloudProvider, resourceName, resourceType, resourceRegion,
resourceAccountId, resourceAccountName, resourceCloudProvider, costDescription.
Sort by a field that the chosen dimension returns.

string
enum

When set, each row also has costByTime: its cost per hour, day, week or month.
Omit it when you do not need a breakdown by time. Use hour only for ranges of a few days;
Azure data has one point per day even with hour.

Allowed:
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