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
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:
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 |
| 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 |
| 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
- Payload
{- "clusters": [ ],
- "from": 1743318000000,
- "gpuWorkloadsOnly": false,
- "groupByCluster": true,
- "groupByNamespace": true,
- "multiCluster": false,
- "range": "7d",
- "shouldIgnoreWorkloads": false,
- "stepSize": 0,
- "tags": [ ],
- "to": 1743318000000,
- "groupByLabels": [ ],
- "groupByAnnotations": [ ]
}Response samples
- 200
{- "aggregatedWorkloads": [
- {
- "amountOfWorkloads": 0,
- "annotations": null,
- "clusterName": "string",
- "hourlyCost": 0.1,
- "id": "string",
- "labels": null,
- "namespace": "",
- "onDemandHours": 0.1,
- "onDemandPercent": 100,
- "ownerCpuRequest": 0.1,
- "ownerGpuRequest": 0,
- "ownerLabels": [
- {
- "key": "string",
- "value": "string"
}
], - "ownerMemoryRequest": 0.1,
- "replicas": 0.1,
- "savingsAvailable": 0.1,
- "savingsAvailableWithReplicas": 0.1,
- "services": [
- "string"
], - "spotHours": 0.1,
- "spotPercent": 0,
- "totalCost": 0.1,
- "workloadName": "",
- "workloadType": ""
}
], - "clusters": [
- "string"
], - "window": {
- "startTime": "2025-01-01T00:00:00",
- "endTime": "2025-01-31T00:00:00"
}
}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:
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 |
| 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
- Payload
{- "annotations": [ ],
- "clusterFilters": [ ],
- "isAnnotationExclude": false,
- "isClusterExclude": false,
- "isLabelExclude": false,
- "isNamespaceExclude": false,
- "isWorkloadTypeExclude": false,
- "labels": [ ],
- "logicalAnnotation": "OR",
- "logicalLabel": "OR",
- "namespaces": [ ],
- "shouldIgnoreWorkloads": false,
- "workloadTypes": [ ]
}Response samples
- 200
{- "aggregatedWorkloads": [
- {
- "amountOfWorkloads": 0,
- "annotations": null,
- "clusterName": "string",
- "hourlyCost": 0.1,
- "id": "string",
- "labels": null,
- "namespace": "",
- "onDemandHours": 0.1,
- "onDemandPercent": 100,
- "ownerCpuRequest": 0.1,
- "ownerGpuRequest": 0,
- "ownerLabels": [
- {
- "key": "string",
- "value": "string"
}
], - "ownerMemoryRequest": 0.1,
- "replicas": 0.1,
- "savingsAvailable": 0.1,
- "savingsAvailableWithReplicas": 0.1,
- "services": [
- "string"
], - "spotHours": 0.1,
- "spotPercent": 0,
- "totalCost": 0.1,
- "workloadName": "",
- "workloadType": ""
}
], - "clusters": [
- "string"
], - "window": {
- "startTime": "2025-01-01T00:00:00",
- "endTime": "2025-01-31T00:00:00"
}
}