删除 Cloud 角色 (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}
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com
📘说明
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
shell
export BASE_URL="https://api.cloud.zilliz.com"
参数
Authorizationstringheader必填项
认证令牌,应为具备适当权限的 API Key。
示例值:Bearer {{TOKEN}}
roleIdstringpath必填项
角色 ID。
示例值: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"
响应200 OK - application/json
Returns a successful result or an error message.
成功响应。
codeinteger必填项
响应码。
示例值:0
databoolean必填项
操作是否成功。
失败响应。
codeinteger必填项
响应码。
messagestring必填项
错误消息。
Successjson
{
"code": 0,
"data": true
}