cURL
curl --request PUT \
--url https://cockroachlabs.cloud/api/v1/roles/{user_id} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '[{"name":"ORG_ROLE_CLUSTER_ADMIN","resource":{"id":"example_cluster_id","type":"CLUSTER"}}]'{
"roles": [
{
"name": "ORG_ROLE_DEVELOPER",
"resource": {
"type": "ORGANIZATION",
"id": "<string>"
}
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Makes the users roles exactly those provided
PUT
/
api
/
v1
/
roles
/
{user_id}
cURL
curl --request PUT \
--url https://cockroachlabs.cloud/api/v1/roles/{user_id} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '[{"name":"ORG_ROLE_CLUSTER_ADMIN","resource":{"id":"example_cluster_id","type":"CLUSTER"}}]'{
"roles": [
{
"name": "ORG_ROLE_DEVELOPER",
"resource": {
"type": "ORGANIZATION",
"id": "<string>"
}
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}This endpoint is in Preview and subject to change. Refer to the API support policy for more details.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Show child attributes
Show child attributes
Response
A successful response.
Show child attributes
Show child attributes

