Skip to main content
GET
/
api
/
v1
/
accounts
/
{accountId}
/
roles
Get all roles for an account
curl --request GET \
  --url https://api.aion.xyz/api/v1/accounts/{accountId}/roles \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "account_admin",
      "name": "account_admin",
      "scope": "ACCOUNT",
      "status": "ACTIVE",
      "isCustom": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "accountId": "my-company-account",
      "projectId": "project-alpha",
      "description": "Full administrative access to the account",
      "createdBy": "admin.user"
    }
  ],
  "meta": {
    "total": 42,
    "page": 1,
    "pageSize": 20,
    "totalPages": 3
  }
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication

Path Parameters

accountId
string
required

The account identifier (external account ID)

Example:

"my-company-account"

Query Parameters

scope
enum<string>

Filter roles by scope The scope of the role:

  • ACCOUNT: Role applies at the account level (e.g., account_admin)
  • PROJECT: Role applies at the project level (e.g., project_admin, project_reader)
  • RESOURCE: Role applies to specific resources
Available options:
ACCOUNT,
PROJECT,
RESOURCE
status
enum<string>

Filter roles by status The status of the role

Available options:
ACTIVE,
INACTIVE
projectId
string

Filter roles by project ID (for project-scoped roles)

Example:

"project-alpha"

page
integer
default:1

Page number for pagination (default 1)

Example:

1

pageSize
integer
default:20

Number of items per page (default 20, max 100)

Required range: x <= 100
Example:

20

Response

Successfully retrieved roles

data
object[]
meta
object