GEThttps://api.spotinst.io/setup/account?cloudAccountId={CLOUD_ACCOUNT_ID}

Get a list of Spot 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.

Note: In case you want to list all the accounts associated with Organization you can use the below request URL without the cloudAccountId parameter
https://api.spotinst.io/setup/account

Parameter Type Description
cloudAccountId String

Will list only the Spot accounts connected to the specified account ID.

awsAccountId String

Note: This parameter is deprecated. Use cloudAccountId instead.

Request

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

Headers
Copied!
Downloaded!
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "e2923755-80ec-4751-be1a-3b4b4400d1d1",
    "url": "/setup/account?cloudAccountId=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
  }
}