Skip to main content

Get roles

The endpoint returns the list of roles.

HTTP request

GET https://$instanceId.id.nevis.cloud/nevis/api/v1/roles

Parameters

ParameterInTypeRequired / OptionalDescription
instanceIdpathstringrequiredThe ID of your Identity Cloud instance
limitqueryintegeroptionalThe maximum size limit of the token-based pagination results Default 1000
continuationTokenquerystringoptionalThe 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.

ParameterTypeDescription
itemsarray of rolesThe collection of roles
_paginationobjectThe pagination object. For more information, see Token-based pagination.

Role

ParameterTypeDescription
createdstringThe creation date of the role in ISO 8061 timestamp format YYYY-MM-DDThh:mm:ssZ
roleIdstringThe identifier of the role
namestringThe name of the role
descriptionstringThe description of the role
lastModifiedstringThe last modification date of the role modification in ISO 8061 timestamp format YYYY-MM-DDThh:mm:ssZ
versionintegerThe 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.