Skip to content

List accounts across connections

GET
/api/v1/aws/accounts
curl --request GET \
--url https://api.aletheia-ops.com/api/v1/aws/accounts \
--header 'Authorization: Bearer <token>'

Every non-removed AWS account in the organization, regardless of which connection onboarded it, as identity-only references. Use this to choose an account when the connection is not known — linking a Terraform state source to its account, for example. For the full account record (regions, validation detail, role ARN), list a connection’s accounts instead.

OK

Media typeapplication/json

Org-wide account-reference list response

object
items
Array<object>

An account’s identity only — what a picker needs to let the user choose an account (e.g

object
id
string
account_id
string
name
string
ou_path
string
status
string
Examplegenerated
{
"items": [
{
"id": "example",
"account_id": "example",
"name": "example",
"ou_path": "example",
"status": "example"
}
]
}

No valid credential was presented, or it has expired.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "unauthorized",
"message": "authentication required"
}

Authenticated, but not permitted to perform this action.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "forbidden",
"message": "you do not have permission to perform this action"
}

An unexpected failure. Diagnostic detail is logged server-side and deliberately not returned. Quote the X-Request-Id response header when reporting one.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
Exampleinternal_error
{
"code": "internal_error",
"message": "internal server error"
}