Skip to Content

ScaleOps OpenAPI Specification (1.0.0)


Welcome to the ScaleOps OpenAPI Specification. Here you will find REST definitions.

The API is hosted at https://<your ScaleOps host>/ and requires Bearer Token Authentication. API Authentication Documentation

Detailed Cost Report

Get aggregated cost report

Returns detailed costs grouped by cluster, namespaces, labels and more. You can pass filtering options via query parameters or via the JSON request body.

Authorizations:
bearerAuth
query Parameters
clusters
Array of strings
Default: ""

List of clusters

from
integer <int64>
Example: from=1743318000000

The start timestamp for the query, represented in milliseconds since the Unix epoch (January 1, 1970). This defines the beginning of the time range for data retrieval.

gpuWorkloadsOnly
boolean
Default: false

A boolean value that determines whether to filter the query results to only include GPU workloads. If true, only workloads with GPUs are included in the results.

groupByCluster
boolean

A boolean value that indicates whether to group the results by cluster. If true, the results will be organized by individual clusters.

groupByNamespace
boolean

A boolean value that indicates whether to group the results by namespace. If true, the results will be divided by namespaces within each cluster.

multiCluster
boolean
Default: false

Must be set to true if you want to fetch data from multiple or other clusters.

range
string
Default: "7d"

A string that specifies the time range for the query. In this case, "7d" represents the last 7 days of data.

shouldIgnoreWorkloads
boolean
Default: false
stepSize
integer <int64>

The interval (in seconds) between data points in the time series. A value of 0 indicates that the default step size should be used.

tags
Array of strings
Default: ""

A list of tags.

to
integer <int64>
Example: to=1743318000000

The end timestamp for the query, represented in milliseconds since the Unix epoch (January 1, 1970). This defines the end of the time range for data retrieval.

Request Body schema: application/json

request body for detailed cost report

clusters
Array of strings
Default: []

List of clusters

from
integer <int64>

The start timestamp for the query, represented in milliseconds since the Unix epoch (January 1, 1970). This defines the beginning of the time range for data retrieval.

gpuWorkloadsOnly
boolean
Default: false

A boolean value that determines whether to filter the query results to only include GPU workloads. If true, only workloads with GPUs are included in the results.

groupByCluster
boolean

A boolean value that indicates whether to group the results by cluster. If true, the results will be organized by individual clusters.

groupByNamespace
boolean

A boolean value that indicates whether to group the results by namespace. If true, the results will be divided by namespaces within each cluster.

multiCluster
boolean
Default: false

Must be set to true if you want to fetch data from multiple or other clusters.

range
string
Default: "7d"

A string that specifies the time range for the query. In this case, "7d" represents the last 7 days of data.

shouldIgnoreWorkloads
boolean
Default: false
stepSize
integer <int64>

The interval (in seconds) between data points in the time series. A value of 0 indicates that the default step size should be used.

tags
Array of strings
Default: []

A list of tags.

to
integer <int64>

The end timestamp for the query, represented in milliseconds since the Unix epoch (January 1, 1970). This defines the end of the time range for data retrieval.

groupByLabels
Array of strings
Default: []

A list of labels by which the results should be grouped. This allows for grouping the data based on specific labels, such as application name or environment.

groupByAnnotations
Array of strings
Default: []

A list of annotations by which the results should be grouped. This enables grouping based on specific annotations, which can provide additional metadata about workloads or resources.

Responses

Request samples

Content type
application/json
{
  • "clusters": [ ],
  • "from": 1743318000000,
  • "gpuWorkloadsOnly": false,
  • "groupByCluster": true,
  • "groupByNamespace": true,
  • "multiCluster": false,
  • "range": "7d",
  • "shouldIgnoreWorkloads": false,
  • "stepSize": 0,
  • "tags": [ ],
  • "to": 1743318000000,
  • "groupByLabels": [ ],
  • "groupByAnnotations": [ ]
}

Response samples

Content type
application/json
{
  • "aggregatedWorkloads": [
    ],
  • "clusters": [
    ],
  • "window": {
    }
}

Get workload cost report

Returns detailed workload costs filtered by annotations, labels, namespaces, and more. You can pass filtering options via query parameters or via the JSON request body.

Authorizations:
bearerAuth
query Parameters
annotations
Array of strings
Default: ""

A list of annotations to filter the query results by. Annotations are key-value pairs that provide additional metadata for resources. If empty, no filtering by annotations is applied.

clusterFilters
Array of strings
Default: ""

A list of filters to apply to the clusters. This can be used to restrict the query to certain clusters based on predefined criteria. If empty, no specific filters are applied.

isAnnotationExclude
boolean
Default: false

A boolean value that determines whether the value of annotations should be excluded from the query results. If true, the results will exclude any resources with matching annotations.

isClusterExclude
boolean
Default: false

A boolean value that determines whether the value of clusters should be excluded from the query results. If true, the query will exclude any resources from the specified clusters.

isLabelExclude
boolean
Default: false

A boolean value that determines whether the value of labels should be excluded from the query results. If true, the query will exclude any resources that match the specified labels.

isNamespaceExclude
boolean
Default: false

A boolean value that determines whether the value of namespaces should be excluded from the query results. If true, any resources in the specified namespaces will be excluded from the query.

isWorkloadTypeExclude
boolean
Default: false

A boolean value that determines whether the value of workloads of specific types should be excluded from the query results. If true, workloads of the specified types will be excluded from the query.

labels
Array of strings
Default: ""

A list of labels to filter the query results by. Labels are key-value pairs used to organize resources. If empty, no filtering by labels is applied.

logicalAnnotation
string
Default: "OR"

A string that represents the logical condition for filtering annotations. This could define how annotations should be combined or matched (e.g., "AND", "OR", etc.) when filtering.

logicalLabel
string
Default: "OR"

A string that represents the logical condition for filtering labels. Similar to logicalAnnotation, this field defines how labels should be combined or matched when filtering (e.g., "AND", "OR", etc.).

multiCluster
boolean
Default: false

Must be set to true if you want to fetch data from multiple or other clusters.

namespaces
Array of strings
Default: ""

A list of namespaces to filter the query results by. Namespaces are used to organize Kubernetes resources. If empty, no filtering by namespaces is applied.

shouldIgnoreWorkloads
boolean
Default: false
workloadTypes
Array of strings
Default: ""

A list of workload types to filter the query results by (e.g., Deployment, StatefulSet, etc.). If empty, no filtering by workload types is applied.

Request Body schema: application/json

request body for detailed cost report

annotations
Array of strings
Default: []

A list of annotations to filter the query results by. Annotations are key-value pairs that provide additional metadata for resources. If empty, no filtering by annotations is applied.

clusterFilters
Array of strings
Default: []

A list of filters to apply to the clusters. This can be used to restrict the query to certain clusters based on predefined criteria. If empty, no specific filters are applied.

isAnnotationExclude
boolean
Default: false

A boolean value that determines whether the value of annotations should be excluded from the query results. If true, the results will exclude any resources with matching annotations.

isClusterExclude
boolean
Default: false

A boolean value that determines whether the value of clusters should be excluded from the query results. If true, the query will exclude any resources from the specified clusters.

isLabelExclude
boolean
Default: false

A boolean value that determines whether the value of labels should be excluded from the query results. If true, the query will exclude any resources that match the specified labels.

isNamespaceExclude
boolean
Default: false

A boolean value that determines whether the value of namespaces should be excluded from the query results. If true, any resources in the specified namespaces will be excluded from the query.

isWorkloadTypeExclude
boolean
Default: false

A boolean value that determines whether the value of workloads of specific types should be excluded from the query results. If true, workloads of the specified types will be excluded from the query.

labels
Array of strings
Default: []

A list of labels to filter the query results by. Labels are key-value pairs used to organize resources. If empty, no filtering by labels is applied.

logicalAnnotation
string
Default: "OR"

A string that represents the logical condition for filtering annotations. This could define how annotations should be combined or matched (e.g., "AND", "OR", etc.) when filtering.

logicalLabel
string
Default: "OR"

A string that represents the logical condition for filtering labels. Similar to logicalAnnotation, this field defines how labels should be combined or matched when filtering (e.g., "AND", "OR", etc.).

namespaces
Array of strings
Default: []

A list of namespaces to filter the query results by. Namespaces are used to organize Kubernetes resources. If empty, no filtering by namespaces is applied.

shouldIgnoreWorkloads
boolean
Default: false
workloadTypes
Array of strings
Default: []

A list of workload types to filter the query results by (e.g., Deployment, StatefulSet, etc.). If empty, no filtering by workload types is applied.

Responses

Request samples

Content type
application/json
{
  • "annotations": [ ],
  • "clusterFilters": [ ],
  • "isAnnotationExclude": false,
  • "isClusterExclude": false,
  • "isLabelExclude": false,
  • "isNamespaceExclude": false,
  • "isWorkloadTypeExclude": false,
  • "labels": [ ],
  • "logicalAnnotation": "OR",
  • "logicalLabel": "OR",
  • "namespaces": [ ],
  • "shouldIgnoreWorkloads": false,
  • "workloadTypes": [ ]
}

Response samples

Content type
application/json
{
  • "aggregatedWorkloads": [
    ],
  • "clusters": [
    ],
  • "window": {
    }
}