fbpx
GEThttps://api.spotinst.io/aws/ec2/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": "8ce51c56-6971-4783-8e15-b92438f7a65d",
    "url": "/aws/ec2/group/sig-12345/costs",
    "method": "GET",
    "timestamp": "2015-07-06T11:44:27.963Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:aws:group",
    "item": {
      "running": {
        "value": "6.00",
        "unit": "hours"
      },
      "savings": {
        "value": "72.8937",
        "unit": "percentage"
      },
      "costs": {
        "actual": "0.2681",
        "potential": "1.5330"
      }
    },
    "count": 1
  }
}