Skip to main content

Create API Key (V2)

Creates a customized ACL API key and assigns its complete initial role set. The secret is returned only once.

POST/v2/api-keys
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}}
Request Body
namestringrequired

The API key display name. It must not be blank.

descriptionstring

The API key description.

orgRolestringrequired

The organization role assigned to the API key: Owner, Member, or Billing-Admin.

projectsarray

The project-level access list. Required when orgRole is Member.

[]projectsobject
projectIdstringrequired

The project ID.

rolestringrequired

The project role: Admin, Read-Write, or Read-Only.

allClusterboolean

Whether access covers all clusters in the project.

clusterIdsarray

The clusters the API key can access when allCluster is false.

[]clusterIdsstring
(To be added soon)
allVolumeboolean

Whether access covers all volumes in the project.

volumeIdsarray

The volumes the API key can access when allVolume is false.

[]volumeIdsstring
(To be added soon)
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
}
]
}'
Responses

Returns a successful result or an error message.

A successful response.

codeintegerrequired

The response code.

Example Value: 0
dataobjectrequired

The newly created API key ID and its one-time secret.

apiKeyIdstringrequired

The public API key ID.

apiKeystringrequired

The secret credential. This value is returned only once.

A failure response.

codeintegerrequired

The response code.

messagestringrequired

The error message.

Successjson
{
"code": 0,
"data": {
"apiKeyId": "key-xxxxxxxxxxxxxx",
"apiKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
Ctrl I