Get available roles for API key creation
Returns the list of roles that can be assigned to an API key.
Returns all roles at or below the current user's privilege level based on the role hierarchy. Also includes an "Inherit My Roles" option.
Use ?sort=asc (default) for least privileged first (API key management page).
Use ?sort=desc for most privileged first (user profile page).
Query Parameters
- Type: stringenumsort
Sort order - asc for least privileged first, desc for most privileged first
values- asc
- desc
Responses
- application/json
- application/json
Request Example for get/auth/api-keys/options/roles
curl 'https://api.gpcn.com/v1/auth/api-keys/options/roles?sort=asc' \
--header 'X-API-Key: YOUR_SECRET_TOKEN'
{
"success": true,
"message": "string",
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "string",
"displayName": "string",
"description": "string",
"sortOrder": 1
}
],
"meta": null
}.png)