fbpx
GEThttps://api.spotinst.io/setup/account?awsAccountId={AWS_ACCOUNT_ID}

Get a list of Spotinst accounts in your organization.  When used without any parameters, the provided token must have Organization Admin permissions and the output will contain all the Organization’s accounts.

Parameter Type Description
awsAccountId String

Optional. Will list only the Spotinst accounts connected to the specified AWS account Id.

Request

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

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "e2923755-80ec-4751-be1a-3b4b4400d1d1",
    "url": "/setup/account?awsAccountId=123456789",
    "method": "GET",
    "timestamp": "2017-11-15T08:03:54.322Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:setup:account",
    "items": [
      {
        "accountId": "act-0b18f123",
        "organizationId": "606079861123",
        "name": "test",
        "providerExternalId": "123456789"

      },
      {
        "accountId": "act-57765123",
        "organizationId": "606079861123",
        "name": "prod",
        "providerExternalId": "123456789"
      }
    ],
    "count": 2
  }
}