cURL
curl --request GET \
--url 'https://cockroachlabs.cloud/api/v1/roles?pagination.page=SOME_STRING_VALUE&pagination.limit=SOME_INTEGER_VALUE&pagination.as_of_time=SOME_STRING_VALUE&pagination.sort_order=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"grants": [
{
"roles": [
{
"name": "CLUSTER_ADMIN",
"resource": {
"id": "example_cluster_id",
"type": "CLUSTER"
}
}
],
"user_id": "12345678-1234-1234-1234-123456789012"
}
],
"pagination": {
"next_page": "<string>",
"previous_page": "<string>"
},
"user_group_grants": [
{
"group_roles": [
{
"group_names": [
"<string>"
],
"role": {
"name": "BILLING_COORDINATOR",
"resource": {
"type": "ORGANIZATION",
"id": "<string>"
}
}
}
],
"user_id": "<string>"
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}List all RoleGrants
Can be used by the following roles assigned at the organization scope:
- ORG_ADMIN
- CLUSTER_ADMIN
- FOLDER_ADMIN
- AUDITOR
GET
/
api
/
v1
/
roles
cURL
curl --request GET \
--url 'https://cockroachlabs.cloud/api/v1/roles?pagination.page=SOME_STRING_VALUE&pagination.limit=SOME_INTEGER_VALUE&pagination.as_of_time=SOME_STRING_VALUE&pagination.sort_order=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"grants": [
{
"roles": [
{
"name": "CLUSTER_ADMIN",
"resource": {
"id": "example_cluster_id",
"type": "CLUSTER"
}
}
],
"user_id": "12345678-1234-1234-1234-123456789012"
}
],
"pagination": {
"next_page": "<string>",
"previous_page": "<string>"
},
"user_group_grants": [
{
"group_roles": [
{
"group_names": [
"<string>"
],
"role": {
"name": "BILLING_COORDINATOR",
"resource": {
"type": "ORGANIZATION",
"id": "<string>"
}
}
}
],
"user_id": "<string>"
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
- ASC: Sort in ascending order. This is the default unless otherwise specified.
- DESC: Sort in descending order.
Available options:
ASC, DESC 
