Skip to main content

Create Serverless Cluster

Creates a serverless cluster.


POST
https://controller.${CLOUD_REGION}.zillizcloud.com/v1/clusters/createServerless

Example

📘Notes

This API requires an API key as the authentication token.

export CLOUD_REGION="gcp-us-west1"
export API_KEY=""

curl --location --request POST "https://controller.api.${CLOUD_REGION}.zillizcloud.com/v1/clusters/createServerless" \
--header "Authorization: Bearer ${API_KEY}" \
--data-raw '{
"plan": "Serverless",
"clusterName": "test",
"projectId": "proj-xxxxxxxxxxxxxxxxxxxxxx"
}'
{
"code": 200,
"data": {
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"username": "db_xxxxxxxxxxxxxxx",
"password": "xxxxxxxxxxxxxxxxx",
"prompt": "Successfully submitted, cluster is being created. You can access data about the creation progress and status of your cluster by DescribeCluster API. Once the cluster status is RUNNING, you may access your vector database using the SDK with the admin account and the initial password you specified."
}
}

Request

Parameters

  • No query parameters required

  • No path parameters required

  • Header parameters

    ParameterDescription
    Authorizationstring

Request Body

{
"plan": "string",
"clusterName": "string",
"projectId": "string"
}
ParameterDescription
planstring
The subscription plan of the cluster to be created. Possible values are free and serverless.
Possible values: "Free", "Serverless"
clusterNamestring
The name of the cluster to be created. It is a string of no more than 32 characters.
projectIdstring
The ID of the project where the cluster is to be created.

Response

Returns an object that contains the details of the created cluster.

Response Body

{
"code": "integer",
"data": {
"clusterId": "string",
"username": "string",
"password": "string",
"prompt": "string"
}
}
PropertyDescription
codeinteger
Indicates whether the request succeeds.
  • 0: The request succeeds.
  • Others: Some error occurs.
dataobject
data.clusterIdstring
The ID of the cluster affected by this operation.
data.usernamestring
The name of the cluster user generated by default.
data.passwordstring
The password of the cluster user generated by default. It will not be displayed again, so note it down and securely store it.
data.promptstring
The statement indicating that this operation succeeds.

Error Response

{
"code": integer,
"message": string
}
PropertyDescription
codeinteger
Indicates whether the request succeeds.
  • 0: The request succeeds.
  • Others: Some error occurs.
messagestring
Indicates the possible reason for the reported error.