Skip to main content

Create Import Jobs

This operation imports the prepared data files to a Zilliz Cloud cluster. To learn how to prepare your data files, read Prepare Data Import.

POST
/v2/vectordb/jobs/import/create
Base URL

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.

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 Bodyapplication/json
clusterIdstringrequired

The ID of the cluster to which the collection belongs. Setting this to a non-existing cluster results in an error. You can get the cluster ID by calling the /v2/clusters endpoint, or copy the cluster ID from the Zilliz Cloud console.

Example Value: inxx-xxxxxxxxxxxxxxxx
dbNamestring

The name of the database that to which the collection belongs . Setting this to a non-existing database results in an error.

collectionNamestringrequired

The name of the target collection. Setting this to a non-existing collection results in an error.

partitionNamestring

The name of the target partition. Setting this to a non-existing partition results in an error.

objectUrlstring

The URL of the object to import. This URL should be accessible to the S3-compatible object storage service, such as AWS S3, GCS, Azure blob storage.

objectUrlsarrayrequired

The URLs of the objects to import.
Applicable formats and how to import multiple objects in one job are as follows:

.

[]objectUrlsarray

A list of the URL to the data file containing a batch of entities to import.
Each list contains only one URL.

accessKeystring

The access key of the object storage service.

secretKeystring

The secret access key of the object storage service.

tokenstring

A temporary token for you to access the object storage service. The token name and the way to obtain it may vary with cloud providers. For details, refer to the FAQ.

export TOKEN="YOUR_API_KEY"

curl --request POST \
--url "${BASE_URL}/v2/vectordb/jobs/import/create" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"dbName": "default",
"collectionName": "medium_articles",
"partitionName": "",
"objectUrls": [
[
"https://s3.us-west-2.amazonaws.com/publicdataset.zillizcloud.com/medium_articles_2020_dpr/medium_articles_2020_dpr.json"
]
],
"accessKey": "",
"secretKey": ""
}'
Responses200 - application/json
codeinteger

Response code.

Example Value: 0
dataarray

Response payload which carries the IDs of the created bulk-import jobs.

[]dataobject

A created bulk-import job.

jobIdstring

The ID of the current bulk-import job.

Returns an error message.

codeinteger

Response code.

messagestring

Error message.

{
"code": 0,
"data": {
"jobId": "job-xxxxxxxxxxxxxxxxxxxxx"
}
}