Run Pipeline
This runs a specific pipeline.
The base URL for this API is in the following format:
https://controller.api.${CLOUD_REGION}.zillizcloud.com
- You need to replace
${CLOUD_REGION}
with the appropriate region for your deployment. - To get the cloud region ID, refer to On Zilliz Cloud Console or List Cloud Regions.
export CLOUD_REGION="gcp-us-west1"
export BASE_URL="https://controller.api.${CLOUD_REGION}.zillizcloud.com"
The authentication token should be an API key with appropriate privileges.
A valid pipeline ID obtained from either the list-pipelines API endpoints or Zilliz Cloud console.
Data ingestion parameters.
The URL of the document stored on an object storage. You should use a URL that is either not encoded or encoded in UTF-8. Ensure that the URL remains valid for at least one hour.
The metadata field to preserve. The input field name should be consistent with what you defined when creating the Ingestion pipeline and adding the PRESERVE function. The value of this field should also follow the predefined field type.
The text or text list to ingest.
The metadata field to preserve. The input field name should be consistent with what you defined when creating the Ingestion pipeline and adding the PRESERVE function. The value of this field should also follow the predefined field type.
The URL of the image stored on an object storage. You should use a URL that is either not encoded or encoded in UTF-8. Ensure that the URL remains valid for at least one hour.
The ID of the image stored on an object storage.
The title of the image.
Search data.
A query text. Zilliz Cloud embeds it and use the generated vector embeddings to conduct a search in the target collection. This applies to pipelines of a SEARCHTEXT, a SEARCHDOCCHUNK, or a SEARCHIMAGEBYTEXT type.
The URL of a query image. This applies to pipelines of a SEARCHIMAGEBY_IMAGE type.
Search parameters.
Total number of records to return.
Total number of records to skip in the search results.
A list of fields to output for each match in the search result.
A valid output field and should be the one defined in the preserve functions.
A boolean expression for Zilliz Cloud to filter records before actual searches.
Payload of the deletion request.
A filter expression. This applies to pipelines of the INDEX_TEXT type.
Name of the document to delete. Note that you can delete document by its name, and all the chunks of the document will be removed. This applies to pipelines of the INDEXDOCCHUNK type.
ID of an image. This applies to pipelines of the INDEX_IMAGE type.
export TOKEN="YOUR_API_KEY"
export PIPELINE_ID="pipe-xxxxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v1/pipeline/${PIPELINE_ID}/run" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"data": {
"text_list": [
"Zilliz Cloud is a fully managed vector database and data services, empowering you to unlock the full potential of unstructured data for your AI applications.",
"It can store, index, and manage massive embedding vectors generated by deep neural networks and other machine learning (ML) models."
],
"source": "Zilliz official website"
}
}'
export TOKEN="YOUR_API_KEY"
export PIPELINE_ID="pipe-xxxxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v1/pipeline/${PIPELINE_ID}/run" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"data": {
"doc_url": "https://storage.googleapis.com/example-bucket/zilliz_concept_doc.md?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=example%40example-project.iam.gserviceaccount.com%2F20181026%2Fus-central1%2Fstorage%2Fgoog4_request&X-Goog-Date=20181026T181309Z&X-Goog-Expires=900&X-Goog-SignedHeaders=host&X-Goog-Signature=247a2aa45f169edf4d187d54e7cc46e4731b1e6273242c4f4c39a1d2507a0e58706e25e3a85a7dbb891d62afa8496def8e260c1db863d9ace85ff0a184b894b117fe46d1225c82f2aa19efd52cf21d3e2022b3b868dcc1aca2741951ed5bf3bb25a34f5e9316a2841e8ff4c530b22ceaa1c5ce09c7cbb5732631510c20580e61723f5594de3aea497f195456a2ff2bdd0d13bad47289d8611b6f9cfeef0c46c91a455b94e90a66924f722292d21e24d31dcfb38ce0c0f353ffa5a9756fc2a9f2b40bc2113206a81e324fc4fd6823a29163fa845c8ae7eca1fcf6e5bb48b3200983c56c5ca81fffb151cca7402beddfc4a76b133447032ea7abedc098d2eb14a7",
"publish_year": 2023
}
}'
export TOKEN="YOUR_API_KEY"
export PIPELINE_ID="pipe-xxxxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v1/pipeline/${PIPELINE_ID}/run" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"data": {
"image_id": "my-img-123456",
"image_url": "xxx",
"image_title": "A cute yellow cat"
}
}'
Response code.
Payload of the response.
Response of a text ingestion pipeline.
Number of text strings added to the collection.
IDs of the returned text strings in the collection.
An ID of an text string inserted in the collection.
Token usage statistics
Number of tokens used in text embedding
Payload of the response.
Number of chunks generated.
Name of the chunked document with the file extension.
Token usage statistics
Number of tokens used in text embedding
Response of an image ingestion pipeline.
Number of images added.
Token usage statistics
Number of tokens used in image embedding
Response code.
Payload of the response
Response of a search pipeline.
Returned search result of a document pipeline. It is an array of objects.
Returned search result of a text pipeline. It is an array of objects.
Returned search result of an image pipeline. It is an array of objects.
Token usage statistics
Number of tokens used in embedding
Number of tokens used for reranking.
Response code.
Response payload of the deletion pipeline.
Number of deleted chunks. Note that Zilliz Cloud deletes all chunks of a document if a deletion pipeline carries its name. This applies to pipeline of the PURGE_DOC_INDEX
type.
Number of deleted entities. This applies to pipelines of the PURGE_IMAGE_INDEX
, PURGE_TEXT_INDEX, and
PURGEBYEXPRESSION` types.
Returns an error message.
Response code.
Error message.
{
"code": 200,
"data": {
"num_entities": 2,
"usage": {
"embedding": 63
},
"ids": [
450524927755105900,
450524927755105900
]
}
}
{
"code": 200,
"data": {
"doc_name": "zilliz_concept_doc.md",
"usage": {
"embedding": 1241
},
"num_chunks": 3
}
}
{
"code": 200,
"data": {
"num_entities": 1,
"usage": {
"embedding": 1
}
}
}