Skip to main content

Delete Cloud Role (V2)

Soft-deletes a custom role. Deletion is not cascading: if the role still has any active binding (user, group, or API key), the request is rejected with 21141 this role is in use. Revoke all of its bindings first, then delete the role. The request is also rejected if it would remove the last principal able to manage roles in a scope, or if the role is pre-defined.

DELETE/v2/roles/{roleId}
Connection Endpoint

The base URL for this API is in the following format:

https://api.cloud.zilliz.com

📘Notes

The endpoints on the control plane currently supports up to 20 requests per second per user per endpoint.

shell
export BASE_URL="https://api.cloud.zilliz.com"
Parameters
Authorizationstringheaderrequired

The authentication token should be an API key with appropriate privileges.

Example Value: Bearer {{TOKEN}}
roleIdstringpathrequired

The role ID.

Example Value: r-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
bash
export TOKEN="YOUR_API_KEY"
export roleId="r-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

curl --request DELETE \
--url "${BASE_URL}/v2/roles/${roleId}" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json"
Responses

Returns a successful result or an error message.

A successful response.

codeintegerrequired

The response code.

Example Value: 0
databooleanrequired

Whether the operation succeeded.

A failure response.

codeintegerrequired

The response code.

messagestringrequired

The error message.

Successjson
{
"code": 0,
"data": true
}
Ctrl I