Skip to main content

Import

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


POST
https://controller.${CLOUD_REGION}.zillizcloud.com/v1/vector/collections/import

Example

📘Notes

This API requires an API key as the authentication token.

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

curl --location --request POST "https://controller.api.${CLOUD_REGION}.zillizcloud.com/v1/vector/collections/import" \
--header "Authorization: Bearer ${API_KEY}" \
--data-raw '{
"clusterId": "inxx-xxxxxxxxxxxxxxx",
"collectionName": "medium_articles",
"objectUrl": "gs://docs-demo/1af78216-xxxx-xxxx-xxxx-2b0a73c566ed/1.parquet",
"accessKey": "${ACCESS_KEY}",
"secretKey": "${SECRET_KEY}"
}'

Possible return is similar to the following.

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

Request

Parameters

  • No query parameters required

  • No path parameters required

  • Header parameters

    ParameterDescription
    Authorizationstring

Request Body

{
"clusterId": "string",
"collectionName": "string",
"objectUrl": "string",
"accessKey": "string",
"secretKey": "string"
}
ParameterDescription
clusterIdstring
The ID of a cluster to which this operation applies.
collectionNamestring
The name of the collection to which this operation applies.
objectUrlstring
The URL of the object that stores the data to be imported.
accessKeystring
The access key used to access the specified object.
secretKeystring
The access secret key used to access the specified object.

Response

Returns a import task job ID.

Response Body

{
"code": "integer",
"data": {
"jobId": "string"
}
}
PropertyDescription
codeinteger
Indicates whether the request succeeds.
  • 0: The request succeeds.
  • Others: Some error occurs.
dataobject
data.jobIdstring
The ID of the import task that has been submitted

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.