APIキーの作成(V2)
Creates a customized ACL API key and assigns its complete initial role set. The secret is returned only once.
POST/v2/api-keys
https://api.cloud.zilliz.com
shell
export BASE_URL="https://api.cloud.zilliz.com"
パラメータ
Authorizationstringheader必要
認証トークンは、適切な権限を持つAPIキーである必要があります。
値の例: Bearer {{TOKEN}}
リクエスト・ボディapplication/json
namestring必要
APIキーの表示名。空白にすることはできません。
descriptionstring
APIキーの説明。
orgRolestring必要
APIキーに割り当てる組織ロール: Owner、Member、またはBilling-Admin。
projectsarray
プロジェクトレベルのアクセスリスト。orgRoleがMemberの場合に必須です。
[]projectsobject
projectIdstring必要
プロジェクトID。
rolestring必要
プロジェクトロール: Admin、Read-Write、またはRead-Only。
allClusterboolean
アクセスがプロジェクト内のすべてのクラスターを対象とするかどうか。
clusterIdsarray
allClusterがfalseの場合にAPIキーがアクセスできるクラスター。
[]clusterIdsstring
(近日追加予定)
allVolumeboolean
アクセスがプロジェクト内のすべてのボリュームを対象とするかどうか。
volumeIdsarray
allVolumeがfalseの場合にAPIキーがアクセスできるボリューム。
[]volumeIdsstring
(近日追加予定)
Create An API Keybash
export TOKEN="YOUR_API_KEY"
curl --request POST \
--url "${BASE_URL}/v2/api-keys" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"name": "Data Pipeline",
"description": "API key used by the ingestion pipeline",
"orgRole": "Member",
"projects": [
{
"projectId": "proj-xxxxxxxx",
"role": "Data Reader",
"allCluster": true,
"allVolume": true
}
]
}'
レスポンス200 OK - application/json
成功した結果またはエラーメッセージを返します。
成功したレスポンス。
codeinteger必要
レスポンスコード。
値の例: 0
dataobject必要
新しく作成されたAPIキーIDとその一度きりのシークレット。
apiKeyIdstring必要
公開APIキーID。
apiKeystring必要
シークレット認証情報。この値は一度だけ返されます。
失敗したレスポンス。
codeinteger必要
レスポンスコード。
messagestring必要
エラーメッセージ。
Successjson
{
"code": 0,
"data": {
"apiKeyId": "key-xxxxxxxxxxxxxx",
"apiKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}