fbpx
GEThttps://api.spotinst.io/aws/costs?accountId={ACCOUNT_ID}&fromDate={FROM_DATE}&toDate={TO_DATE}

Parameter Type Description
ACCOUNT_ID String

The account for which to retrieve financial information.

Example: act-12345
Default: The default account
FROM_DATE String

Date can be either in date format (yyyy-mm-dd) or in Unix Timestamp format (e.g. 1494751821472).

Example: 2018-06-20
TO_DATE String

Date can be either in date format (yyyy-mm-dd) or in Unix Timestamp format (e.g. 1494751821472).

Example: 2018-11-20
Request

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

Headers
{
   "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "request": {
        "id": "8ce51c56-6971-4783-8e15-b92438f7a65d",
        "url": "/aws/costs",
        "method": "GET",
        "timestamp": "2015-07-06T11:44:27.963Z"
    },
    "response": {
        "status": {
            "code": 200,
            "message": "OK"
        },
        "kind": "spotinst:aws:costs",
        "items": [
{
   "spot": {
       "runningHours": "1470.80",
       "actualCosts": "107.30",
       "potentialCosts": "378.41",
       "savingsPercentage": "71.64"
      }
   }
],             
        "count": 1
    }
}