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
Parameter Description Authorization string
Request Body
{
"clusterId": "string",
"collectionName": "string",
"objectUrl": "string",
"accessKey": "string",
"secretKey": "string"
}
Parameter | Description |
---|---|
clusterId | string The ID of a cluster to which this operation applies. |
collectionName | string The name of the collection to which this operation applies. |
objectUrl | string The URL of the object that stores the data to be imported. |
accessKey | string The access key used to access the specified object. |
secretKey | string The access secret key used to access the specified object. |
Response
Returns a import task job ID.
Response Body
{
"code": "integer",
"data": {
"jobId": "string"
}
}
Property | Description |
---|---|
code | integer Indicates whether the request succeeds.
|
data | object |
data.jobId | string The ID of the import task that has been submitted |
Error Response
{
"code": integer,
"message": string
}
Property | Description |
---|---|
code | integer Indicates whether the request succeeds.
|
message | string Indicates the possible reason for the reported error. |