fbpx
GEThttps://api.spotinst.io/aws/emr/mrScaler/{MRSCALER_ID}/costs?fromDate={fromDATE}&toDate={toDATE}&accountId={ACCOUNT_ID}

Parameters

Parameter Type Description
MRSCALER_ID * String

The MRScaler id you want to get costs for

Example: simrs-12223
fromDATE * String

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

Example: 2018-03-02
toDATE * String

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

Example: 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": "bee3589d-2194-4724-81d2-16eaf80589d6",
    "url": "/aws/emr/mrScaler/simrs-12223456789/costs",
    "method": "GET",
    "timestamp": "2015-08-02T09:14:15.884Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:aws:emr:mrScaler:costs",
    "items": [
      {
        "running": {
          "value": "13.00",
          "unit": "hours"
        },
        "savings": {
          "value": "86.3245",
          "unit": "percentage"
        },
        "costs": {
          "actual": "0.4729",
          "potential": "3.4580"
        }
      }
    ],
    "count": 1
  }
}