Reference
Google Cloud cost by a hierarchy of labels
Returns Google Cloud spend grouped by up to three label keys at once, for example cluster, namespace and workload. A resource label wins over the same key set on its project.
Authorization
BearerAuth In: header
Query Parameters
Label keys, in order
key=value pairs to narrow to
Cost basis for Google Cloud: after credits (default) or before them. AWS stays on its invoiced basis.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/costs/by-labels?key=string"{
"success": true,
"timestamp": "2019-08-24T14:15:22Z",
"data": {
"keys": [
"string"
],
"credits": "before",
"total": 0,
"unlabeled": 0,
"items": [
{
"values": {
"property1": "string",
"property2": "string"
},
"cost": 0,
"share_pct": 0
}
]
}
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}Get cost breakdown GET
Returns cost breakdown in different formats: table (paginated), chart (aggregated), csv (export), raw (all records)
List distinct tag keys GET
Returns the distinct provider tag keys present in the tenant's per-tag cost data and every virtual tag key, so the dashboard can offer both as choices. A provider key that a virtual key of the same name replaces is left out.