Retrieves spectro clusters resources cost summary information
POSThttps://api.spectrocloud.com/v1/dashboard/spectroclusters/resources/cost
Authorization: ApiKey
name: ApiKeytype: apiKeydescription: API key authorization where API key can be generated from Palette console under Profile > My API Keysin: header
Retrieves spectro clusters resources cost summary information
Request
Header Parameters
ProjectUid string
Scope the request to the specified project uid
- application/json
Body
filter object
options object
Responses
- 200
An array of resources cost summary items
- application/json
- Schema
- Example (from schema)
Schema
resources object[]
total object
{
"resources": [
{
"associatedResources": [
{
"kind": "string",
"name": "string",
"uid": "string"
}
],
"data": [
{
"cpu": 0,
"memory": 0,
"storage": 0,
"timestamp": 0,
"total": 0
}
],
"entity": {
"kind": "string",
"name": "string",
"uid": "string"
},
"total": {
"cpu": 0,
"memory": 0,
"storage": 0,
"total": 0
}
}
],
"total": {
"cpu": 0,
"memory": 0,
"storage": 0,
"total": 0
}
}
- curl
- python
- go
- nodejs
- java
- CURL
curl -L -X POST 'https://api.spectrocloud.com/v1/dashboard/spectroclusters/resources/cost' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'ApiKey: <API_KEY_VALUE>' \
--data-raw '{
"filter": {
"clouds": [
"string"
],
"clusters": [
"string"
],
"endTime": "2023-12-01T21:31:48.030Z",
"includeMasterMachines": true,
"namespaces": [
"string"
],
"projects": [
"string"
],
"startTime": "2023-12-01T21:31:48.030Z",
"workspaces": [
"string"
]
},
"options": {
"enableSummaryView": true,
"groupBy": "cluster",
"period": 60
}
}'