cURL
curl --request POST \
--url https://cockroachlabs.cloud/api/v1/roles/{user_id}/{resource_type}/{resource_id}/{role_name} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"roles": [
{
"name": "ORG_ROLE_DEVELOPER",
"resource": {
"type": "ORGANIZATION",
"id": "<string>"
}
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Adds the user to the given role
POST
/
api
/
v1
/
roles
/
{user_id}
/
{resource_type}
/
{resource_id}
/
{role_name}
cURL
curl --request POST \
--url https://cockroachlabs.cloud/api/v1/roles/{user_id}/{resource_type}/{resource_id}/{role_name} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"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
Available options:
ORGANIZATION, CLUSTER Available options:
ORG_ROLE_DEVELOPER, ORG_ROLE_ADMIN, ORG_ROLE_BILLING_COORDINATOR, ORG_ROLE_ORG_ADMIN, ORG_ROLE_ORG_MEMBER, ORG_ROLE_CLUSTER_ADMIN, ORG_ROLE_CLUSTER_OPERATOR_WRITER, ORG_ROLE_CLUSTER_OPERATOR_READER, ORG_ROLE_CLUSTER_DEVELOPER, ORG_ROLE_CLUSTER_CREATOR Response
A successful response.
Show child attributes
Show child attributes

