List Roles
GET /roles
GET /rolesInteractive request editor loads with JavaScript.
Authorization
BearerAdminToken Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.
In: header
Response Body
application/json
application/json
curl -X GET "$AISIX_CP/roles" \ -H "Authorization: Bearer $AISIX_TOKEN"OK
{
"data": [
{
"id": "string",
"display_name": "string",
"description": "string",
"permissions": [
{
"action": "string",
"resource": "string",
"description": "string"
}
],
"is_builtin": true
}
]
}Missing or invalid bearer.
{
"error": {
"code": "UNAUTHENTICATED",
"message": "no org context"
}
}Complete operation details and schema variants
GET /roles
List Roles
List the built-in owner, admin, and member roles together with every custom role defined in the authenticated organization.
Parameters
Responses
-
200: OK -
data(array, required): -
data[].id(string, required): Built-in role ID or immutable custom role name. -
data[].display_name(string, required): Role label displayed in the dashboard. -
data[].description(string, required): Human-readable purpose of the role. -
data[].permissions(array, required): -
data[].permissions[].action(string, required): Permission action. The owner role uses*. -
data[].permissions[].resource(string, required): Resource family. The owner role uses*. -
data[].permissions[].description(string, required): Human-readable effect of the permission. -
data[].is_builtin(boolean, required): Whether AISIX Cloud defines and protects the role. -
401: Missing or invalid bearer. -
error(object, required): Error details. -
error.code(string, required): Machine-readable identifier. Examples:UNAUTHENTICATED,INVALID_REQUEST,MASTER_KEY_UNSET,INTERNAL. -
error.message(string, required): Human-readable explanation; safe to surface to operators.
cURL
curl -X GET '$AISIX_CP/roles' -H 'Authorization: Bearer $AISIX_TOKEN'