First call
List the roles of your tenant with a session token.
With a token from Authentication, list the roles of your tenant. The call only reads: it never changes the roles.
curl -sS -H "Authorization: Bearer $TOKEN" "$BPMS_URL/api/v1/access/roles?page=0&size=20&sort=name"Parameters
| Parameter | Default | Rule |
|---|---|---|
page | 0 | Zero-based; a negative value answers 400. |
size | 20 | Between 1 and 100; 0 answers 400 and a larger value is capped at 100. |
sort | name | name or id; ties are broken by id. Any other value answers 400. |
Answer
{
"items": [{"id": 1, "name": "...", "description": "..."}],
"page": 0,
"size": 20,
"totalElements": 1,
"totalPages": 1
}The list holds only the roles of your tenant; deleted roles are left out.
When something fails
Without a valid token the call answers 401 with the code core.authentication-required:
{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "...",
"instance": "/api/v1/access/roles",
"code": "core.authentication-required",
"requestId": "..."
}Keep the requestId when you report a problem: it identifies the call in the server logs. The operation is listRoles under the access tag in the OpenAPI document.