API Reference¶
¶
OPTIONS /accounts
CORS support
- Description: Enable CORS by returning correct headers
- Consumes: [‘application/json’]
- Produces: [‘application/json’]
Responses
200 - Default response for CORS method
GET /accounts
Lists accounts
- Produces: [‘application/json’]
Responses
200 - A list of accounts
403 - Unauthorized
POST /accounts
Add an AWS Account to the account pool
- Consumes: [‘application/json’]
- Produces: [‘application/json’]
Parameters
Name | Position | Description | Type |
---|---|---|---|
account | body | Account creation parameters |
Responses
201 -
403 - Failed to authenticate request
OPTIONS /accounts/{id}
CORS support
- Description: Enable CORS by returning correct headers
- Consumes: [‘application/json’]
- Produces: [‘application/json’]
Responses
200 - Default response for CORS method
GET /accounts/{id}
Get a specific account by an account ID
- Produces: [‘application/json’]
Parameters
Name | Position | Description | Type |
---|---|---|---|
id | path | AWS Account ID | string |
Responses
200 -
403 - Failed to retrieve account
PUT /accounts/{id}
Update an account
- Consumes: [‘application/json’]
- Produces: [‘application/json’]
Parameters
Name | Position | Description | Type |
---|---|---|---|
id | path | AWS Account ID | string |
account | body | Account parameters to modify |
Responses
200 -
403 - Forbidden
DELETE /accounts/{id}
Delete an account by ID.
Parameters
Name | Position | Description | Type |
---|---|---|---|
id | path | The ID of the account to be deleted. | string |
Responses
204 - The account has been successfully deleted.
403 - Unauthorized.
404 - No account found for the given ID.
409 - The account is unable to be deleted.
OPTIONS /leases
CORS support
- Description: Enable CORS by returning correct headers
- Consumes: [‘application/json’]
- Produces: [‘application/json’]
Responses
200 - Default response for CORS method
POST /leases
Creates a new lease.
- Consumes: [‘application/json’]
- Produces: [‘application/json’]
Parameters
Name | Position | Description | Type |
---|---|---|---|
lease | body | The owner of the lease |
Responses
201 -
400 - If the “expiresOn” date specified is non-zero but less than the current epoch date, “Requested lease has a desired expiry date less than today: <date>” or “Failed to Parse Request Body” if the request body is blank or incorrectly formatted.
403 - Failed to authenticate request
409 - Conflict if there is an existing lease already active with the provided principal and account.
500 - Server errors if the database cannot be reached.
DELETE /leases
Removes a lease.
- Consumes: [‘application/json’]
- Produces: [‘application/json’]
Parameters
Name | Position | Description | Type |
---|---|---|---|
lease | body | The owner of the lease |
Responses
200 -
400 - “Failed to Parse Request Body” if the request body is blank or incorrectly formatted. or if there are no account leases found for the specified accountId or if the account specified is not already Active.
403 - Failed to authenticate request
500 - Server errors if the database cannot be reached.
GET /leases
Get leases
- Produces: [‘application/json’]
Parameters
Name | Position | Description | Type |
---|---|---|---|
principalId | query | Principal ID of the leases. | string |
accountId | query | Account ID of the leases. | string |
status | query | Status of the leases. | string |
nextPrincipalId | query | Principal ID with which to begin the scan operation. This is used to traverse through paginated results. | string |
nextAccountId | query | Account ID with which to begin the scan operation. This is used to traverse through paginated results. | string |
limit | query | The maximum number of leases to evaluate (not necessarily the number of matching leases). If there is another page, the URL for page will be in the response Link header. | integer |
Responses
200 - OK
400 - “Failed to Parse Request Body” if the request body is blank or incorrectly formatted.
403 - Failed to authenticate request
OPTIONS /leases/{id}
CORS support
- Description: Enable CORS by returning correct headers
- Consumes: [‘application/json’]
- Produces: [‘application/json’]
Responses
200 - Default response for CORS method
GET /leases/{id}
Get a lease by Id
- Produces: [‘application/json’]
Parameters
Name | Position | Description | Type |
---|---|---|---|
id | path | Id for lease | string |
Responses
200 -
403 - Failed to retrieve lease
OPTIONS /leases/{id}/auth
CORS support
- Description: Enable CORS by returning correct headers
- Consumes: [‘application/json’]
- Produces: [‘application/json’]
Responses
200 - Default response for CORS method
POST /leases/{id}/auth
Create lease authentication by Id
- Produces: [‘application/json’]
Parameters
Name | Position | Description | Type |
---|---|---|---|
id | path | Id for lease | string |
Responses
201 -
401 - Unauthorized
403 - Failed to retrieve lease authentication
500 - Server failure
OPTIONS /usage
CORS support
- Description: Enable CORS by returning correct headers
- Consumes: [‘application/json’]
- Produces: [‘application/json’]
Responses
200 - Default response for CORS method
GET /usage
Get usage records by date range
- Produces: [‘application/json’]
Parameters
Name | Position | Description | Type |
---|---|---|---|
startDate | path | start date of the usage | number |
endDate | path | end date of the usage | number |
Responses
200 -
403 - Failed to authenticate request