List AWS accounts
GET/aws-accounts
Returns one page of the AWS accounts registered with your tenant, ordered by name.
There is no discovery here. This lists what has been registered with Prism, not what exists in your AWS organization; an account nobody has onboarded does not appear, however real it is.
List items are summaries, not the full account. Each carries only
id, account_id, name, status and owner_emails; the identity
provider fields, the timestamps and the last-sync state are not here.
Fetch GET /aws-accounts/{accountId} for those.
Field names are snake_case inside each item and camelCase in the pagination counters around them.
Request
Responses
- 200
- 401
- 403
- 404
- 500
One page of registered accounts. A tenant with no accounts, and a page past the end, are both still a 200.
Authentication failed: the X-API-Token header was missing, malformed,
expired or not recognised.
This response is text/plain, not JSON. It is written by
http.Error in the authentication middleware, which runs before any
handler and therefore before anything that would build a JSON envelope.
A client that unconditionally JSON-parses response bodies will fail on
this one, so check the status code first.
The token is valid, but it is not allowed to act on this tenant.
An API token is minted inside one tenant and stays bound to it for life.
Sending it to a path whose tenant segment names a different tenant is
refused here, in middleware, before the operation runs, so this says
nothing about the resource you asked for, only about which tenant the
path named. Check the tenant server variable against the console the
token was created in.
No tenant matches the tenant segment of the request path. Check the
tenant server variable rather than the query; a search that
matches nothing returns a 200 with an empty page, never a 404.
The accounts could not be read from the database.