Skip to content

List Roles

GET
/api/v1/permissions/roles
curl --request GET \
--url https://example.com/api/v1/permissions/roles

List all roles in the account.

Returns: RoleListResponse with list of roles

Raises: HTTPException: If listing roles fails

X-Environment-Id
Any of:
string

Successful Response

Media typeapplication/json
RoleListResponse

Response containing list of roles.

object
roles
required
Roles

List of roles

Array<object>
RoleInfo

Information about a role.

object
name
required
Name

Role name

string
owner
required
Owner

Role owner

string
comment
Any of:
string
created_on
Any of:
string format: date-time
total_count
required
Total Count

Total number of roles

integer
Examplegenerated
{
"roles": [
{
"name": "example",
"owner": "example",
"comment": "example",
"created_on": "2026-04-15T12:00:00Z"
}
],
"total_count": 1
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}