curl --request DELETE \
--url https://cockroachlabs.cloud/api/v1/roles/{user_id}/{resource_type}/{resource_id}/{role_name} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"group_roles": [
{
"group_names": [
"<string>"
],
"role": {
"name": "BILLING_COORDINATOR",
"resource": {
"type": "ORGANIZATION",
"id": "<string>"
}
}
}
],
"roles": [
{
"name": "BILLING_COORDINATOR",
"resource": {
"type": "ORGANIZATION",
"id": "<string>"
}
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Remove a role from a user, service account, or group
Remove a single role from a user, service account, or group by providing its ID in the user_id path parameter. A principal’s last remaining role cannot be removed; because groups do not hold the implicit Org Member role that users and service accounts have, a group must always retain at least one other role.
Roles that will be removed as a result of this call must follow the CC rules for role assignment: https://www.cockroachlabs.com/docs/cockroachcloud/authorization#organization-user-roles
curl --request DELETE \
--url https://cockroachlabs.cloud/api/v1/roles/{user_id}/{resource_type}/{resource_id}/{role_name} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"group_roles": [
{
"group_names": [
"<string>"
],
"role": {
"name": "BILLING_COORDINATOR",
"resource": {
"type": "ORGANIZATION",
"id": "<string>"
}
}
}
],
"roles": [
{
"name": "BILLING_COORDINATOR",
"resource": {
"type": "ORGANIZATION",
"id": "<string>"
}
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
user_id is the ID of the user, service account, or group to remove the role from.
resource_type is the type of resource the role applies to.
ORGANIZATION, CLUSTER, FOLDER resource_id is the ID of the resource the role applies to. Pass an empty string for organization-scoped roles.
role_name is the role to revoke.
BILLING_COORDINATOR, ORG_ADMIN, ORG_MEMBER, CLUSTER_ADMIN, CLUSTER_OPERATOR_WRITER, CLUSTER_DEVELOPER, CLUSTER_CREATOR, FOLDER_ADMIN, FOLDER_MOVER, METRICS_VIEWER, CLUSTER_MONITOR, BILLING_VIEWER, AUDITOR, CLUSTER_DATA_ACCESSOR 
