メインコンテンツまでスキップ

Revoke Privilege From Role (V2)

This operation revokes a privilege from a role at the global, database, or collection level.

POST/v2/vectordb/roles/revoke_privilege_v2
接続エンドポイント

https://${CLUSTER_ENDPOINT}

📘ノート
  • ${CLUSTER_ENDPOINT} を、あなたのZilliz Cloudクラスターのエンドポイントに置き換える必要があります。
  • エンドポイントを取得するには、Describe Cluster V2 APIを使用してレスポンスから値を抽出してください。
shell
export CLUSTER_ENDPOINT=""
パラメータ
Authorizationstringheader必要

認証トークンには、適切な権限を持つAPIキー、またはユーザー名とパスワードをコロンで連結した組み合わせ(例: username:password)を使用する必要があります。プロジェクトエンドポイントを使用している場合は、十分な権限を持つ有効なAPIキーのみが適用されます。

値の例: Bearer {{TOKEN}}
リクエスト・ボディ
roleNamestring必要

ロールの名前。

privilegestring必要

付与または取り消しの対象となる権限。

dbNamestring

権限が適用されるデータベースの名前。すべてのデータベースを指定するには、* を使用します。

collectionNamestring

権限が適用されるコレクションの名前。すべてのコレクションを指定するには、* を使用します。

bash
export TOKEN="db_admin:xxxxxxxxxxxxx"

curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"roleName": "my_role",
"privilege": "Insert",
"dbName": "my_database",
"collectionName": "my_collection"
}'
レスポンス

なし。

codeinteger

レスポンスコード。

dataobject

エラーメッセージを返します。

codeinteger

レスポンスコード。

messagestring

エラーメッセージ。

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