cURL
curl --request PATCH \
--url https://cockroachlabs.cloud/api/v1/service-accounts/{id} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--json '{"description":"new description","name":"new name"}'{
"created_at": "2022-03-22T20:23:11.285067Z",
"creator_name": "creator",
"description": "",
"group_roles": [],
"id": "12345678-1234-1234-1234-123456789012",
"name": "SA Name",
"roles": [
{
"name": "CLUSTER_ADMIN",
"resource": {
"type": "ORGANIZATION"
}
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Update a service account
To manage roles associated with a service account after creation, pass the service_account_id instead of a user_id to any Role Management endpoint.
Can be used by the following roles assigned at the organization scope:
- ORG_ADMIN
PATCH
/
api
/
v1
/
service-accounts
/
{id}
cURL
curl --request PATCH \
--url https://cockroachlabs.cloud/api/v1/service-accounts/{id} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--json '{"description":"new description","name":"new name"}'{
"created_at": "2022-03-22T20:23:11.285067Z",
"creator_name": "creator",
"description": "",
"group_roles": [],
"id": "12345678-1234-1234-1234-123456789012",
"name": "SA Name",
"roles": [
{
"name": "CLUSTER_ADMIN",
"resource": {
"type": "ORGANIZATION"
}
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Authorizations
Body
application/json
The service account fields to update. Omitted fields are left unchanged.
Response
A successful response.
A service account is an identity scoped to an organization that represents a non-human user.

