Skip to main content

Import

Imports data from files stored in a specified object storage bucket.

POST
/v1/vector/collections/import
Base URL

The base URL for this API is in the following format:

https://controller.api.${CLOUD_REGION}.zillizcloud.com

📘Notes
export CLOUD_REGION="gcp-us-west1"
export BASE_URL="https://controller.api.${CLOUD_REGION}.zillizcloud.com"
Parameters
Authorizationstringheaderrequired

The authentication token should be an API key with appropriate privileges or a pair of colon-joined username and password, like username:password.

Example Value: Bearer {{TOKEN}}
Request Bodyapplication/json
clusterIdstringrequired

The ID of a cluster to which this operation applies.

collectionNamestringrequired

The name of the collection to which this operation applies.

partitionNamestring

The name of the partition to which this operation applies.

objectUrlstringrequired

The URL of the object that stores the data to be imported.

accessKeystring

The access key used to access the specified object.

secretKeystring

The secret access key used to access the specified object.

export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v1/vector/collections/import" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"collectionName": "medium_articles",
"objectUrl": "gs://docs-demo/1af78216-xxxx-2b0a73c566ed/1.parquet",
"accessKey": "xxxxxx",
"secretKey": "xxxxxx"
}'
Responses200 - application/json
codeinteger

Response code.

dataobject

Response payload, which is an object containing the import job ID.

jobIdstringrequired

The ID of the import job that has been submitted.

Returns an error message.

codeinteger

Response code.

messagestring

Error message.

{
"code": 200,
"data": {
"jobId": "job-xxxxxxxxxxxxxxxxxxxxxx"
}
}