Skip to main content
POST
/
kubernetes_efficiency_reports
Create Kubernetes efficiency report
curl --request POST \
  --url https://api.vantage.sh/v2/kubernetes_efficiency_reports \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspace_token": "<string>",
  "title": "<string>",
  "filter": "<string>",
  "start_date": "2023-12-25",
  "end_date": "2023-12-25",
  "date_interval": "this_month",
  "aggregated_by": "idle_cost",
  "date_bucket": "day",
  "groupings": [
    "<string>"
  ]
}
'
{
  "token": "kbnts_eff_rprt_b5c0eedc83b259be",
  "title": "title",
  "default": false,
  "created_at": "2024-11-05T20:32:30Z",
  "workspace_token": "wrkspc_71e915f9671fa270",
  "user_token": null,
  "start_date": "2024-11-01",
  "end_date": "2024-11-30",
  "date_interval": "this_month",
  "date_bucket": "day",
  "aggregated_by": "idle_cost",
  "groupings": "cluster_id",
  "filter": "kubernetes.cluster_id   =   'cluster-1'"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Create a KubernetesEfficiencyReport.

workspace_token
string
required

The Workspace in which the KubernetesEfficiencyReport will be created.

title
string
required

The title of the KubernetesEfficiencyReport.

filter
string

The filter query language to apply to the KubernetesEfficiencyReport. Additional documentation available at https://docs.vantage.sh/vql.

start_date
string<date>

The start date of the KubernetesEfficiencyReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter.

end_date
string<date>

The end date of the KubernetesEfficiencyReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter.

date_interval
enum<string>

The date interval of the KubernetesEfficiencyReport. Incompatible with 'start_date' and 'end_date' parameters. Defaults to 'this_month' if start_date and end_date are not provided.

Available options:
this_month,
last_7_days,
last_30_days,
last_month,
last_3_months,
last_6_months,
custom,
last_12_months,
last_24_months,
last_36_months,
next_month,
next_3_months,
next_6_months,
next_12_months,
year_to_date,
last_3_days,
last_14_days
aggregated_by
enum<string>

The column by which the costs are aggregated.

Available options:
idle_cost,
amount,
cost_efficiency
date_bucket
enum<string>

The date bucket of the KubernetesEfficiencyReport.

Available options:
day,
week,
month
groupings
string[]

Grouping values for aggregating costs on the KubernetesEfficiencyReport. Valid groupings: cluster_id, namespace, labeled, category, pod, label, label:<label_name>.

Response

KubernetesEfficiencyReport model

token
string
title
string

The title of the KubernetesEfficiencyReport.

Example:

"Acme123 Kubernetes Efficiency Metrics"

default
boolean

Indicates whether the KubernetesEfficiencyReport is the default report.

created_at
string

The date and time, in UTC, the report was created. ISO 8601 Formatted.

Example:

"2024-03-19T00:00:00Z"

workspace_token
string

The token for the Workspace the KubernetesEfficiencyReport is a part of.

user_token
string

The token for the User who created this KubernetesEfficiencyReport.

start_date
string

The start date for the KubernetesEfficiencyReport. Only set for custom date ranges. ISO 8601 Formatted.

Example:

"2024-03-01"

end_date
string

The end date for the KubernetesEfficiencyReport. Only set for custom date ranges. ISO 8601 Formatted.

Example:

"2024-03-20"

date_interval
string

The date range for the KubernetesEfficiencyReport. Only present if a custom date range is not specified.

Example:

"last_month"

date_bucket
string

How costs are grouped and displayed in the KubernetesEfficiencyReport. Possible values: day, week, month.

Example:

"month"

aggregated_by
string

How costs are aggregated by. Possible values: idle_cost, amount, cost_efficiency.

groupings
string

Grouping values for aggregating costs on the KubernetesEfficiencyReport. Valid groupings: cluster_id, namespace, labeled, category, pod, label, label:<label_name>.

Example:

"cluster_id, namespace"

filter
string

The filter applied to the KubernetesEfficiencyReport. Additional documentation available at https://docs.vantage.sh/vql.