Get roles
The endpoint returns the list of roles.
HTTP request
GET https://$instanceId.id.nevis.cloud/nevis/api/v1/roles
Parameters
Parameter | In | Type | Required / Optional | Description |
---|---|---|---|---|
instanceId | path | string | required | The ID of your Identity Cloud instance |
limit | query | integer | optional | The maximum size limit of the token-based pagination results Default 1000 |
continuationToken | query | string | optional | The token to retrieve the next set of the token-based pagination results |
Example request
curl "https://$instanceId.id.nevis.cloud/nevis/api/v1/roles?limit=10" \
--header "Authorization: Bearer $accessKey"
HTTP response
On success
HTTP/1.1 200
is returned on success.
Parameter | Type | Description |
---|---|---|
items | array of roles | The collection of roles |
_pagination | object | The pagination object. For more information, see Token-based pagination. |
Role
Parameter | Type | Description |
---|---|---|
created | string | The creation date of the role in ISO 8061 timestamp format YYYY-MM-DDThh:mm:ssZ |
roleId | string | The identifier of the role |
name | string | The name of the role |
description | string | The description of the role |
lastModified | string | The last modification date of the role modification in ISO 8061 timestamp format YYYY-MM-DDThh:mm:ssZ |
version | integer | The version of the role data, used for optimistic locking |
Example response
{
"items": [
{
"created": "2023-01-05T14:18:48Z",
"roleId": "cc000726-b61e-4c4c-88f0-e8b49bdf50a4",
"name": "Admin",
"description": "Administrator role",
"lastModified": "2023-01-05T14:18:48Z",
"version": 1
},
{
"created": "2023-01-05T14:18:49Z",
"roleId": "d576397a-b6cf-4cfa-82f9-faaa24ee4e1f",
"name": "User",
"description": "User role",
"lastModified": "2023-01-05T14:18:49Z",
"version": 1
}
],
"_pagination": {
"limit": 1000,
"continuationToken": "1672928329000_d576397a-b6cf-4cfa-82f9-faaa24ee4e1f"
}
}
On failure
HTTP/1.1 401
is returned if the authorization failed due to an invalid access key.
HTTP/1.1 500
is returned if an unexpected error occurred.