fbpx
GEThttps://api.spotinst.io/gcp/gce/group/{GROUP_ID}/costs?fromDate={fromDATE}&toDate={toDATE}&accountId={ACCOUNT_ID}

Get financial information on a specific Elastigroup

URL Parameters

Parameter Type Description
GROUP_ID * String

The Elastigroup ID you want to query

fromDATE * String

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or Unix Timestamp (1494751821472)

toDATE * String

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or Unix Timestamp (1494751821472)

ACCOUNT_ID String

Your Spotinst accountId associated with your token

Example: act-123abc
Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
   "request": {
       "id": "74447c31-c7f9-4464-8abe-ace1s3452fa4",
       "url": "/gcp/gce/group/sig-7654321/costs?accountId=act-a123456g",
       "method": "GET",
       "timestamp": "2018-03-11T15:44:22.764Z"
   },
   "response": {
       "status": {
           "code": 200,
           "message": "OK"
       },
       "kind": "spotinst:gcp:gce:group:costs",
       "items": [
           {
               "running": {
                   "value": 294.3,
                   "unit": "hours"
               },
               "savings": {
                   "value": 60.5263,
                   "unit": "percentage"
               },
               "costs": {
                   "actual": 8.829,
                   "potential": 22.3668
               }
           }
       ],
       "count": 1
   }
}