Skip to main content

Run Pipeline

This runs a specific pipeline.

POST
/v1/pipeline/{PIPELINE_ID}/run
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.

Example Value: Bearer {{TOKEN}}
PIPELINE_IDstringpathrequired

A valid pipeline ID obtained from either the list-pipelines API endpoints or Zilliz Cloud console.

Example Value: pipe-xxxxxxxxxxxxxxxxx
Request Bodyapplication/json

Data ingestion parameters.

dataoneOfrequired
(To be added soon)
doc_urlstringrequired

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.

\{YOUR_PRESERVED_FIELD}string

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.

text_liststringrequired

The text or text list to ingest.

sourcestring

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.

image_urlstringrequired

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.

image_idstringrequired

The ID of the image stored on an object storage.

image_titlestringrequired

The title of the image.

dataobjectrequired

Search data.

query_textstring

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.

query_image_urlstring

The URL of a query image. This applies to pipelines of a SEARCHIMAGEBY_IMAGE type.

paramsobjectrequired

Search parameters.

limitintegerrequired

Total number of records to return.

offsetintegerrequired

Total number of records to skip in the search results.

outputFieldsarrayrequired

A list of fields to output for each match in the search result.

[]outputFieldsstring

A valid output field and should be the one defined in the preserve functions.

filterstringrequired

A boolean expression for Zilliz Cloud to filter records before actual searches.

dataobjectrequired

Payload of the deletion request.

expressionstringrequired

A filter expression. This applies to pipelines of the INDEX_TEXT type.

doc_namestringrequired

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.

image_idstringrequired

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"
}
}'
Responses200 - application/json
codeinteger

Response code.

dataoneOf

Payload of the response.

Response of a text ingestion pipeline.

num_entitiesinteger

Number of text strings added to the collection.

idsarray

IDs of the returned text strings in the collection.

[]idsinteger

An ID of an text string inserted in the collection.

usageobject

Token usage statistics

embeddinginteger

Number of tokens used in text embedding

Payload of the response.

num_chunksinteger

Number of chunks generated.

doc_namestring

Name of the chunked document with the file extension.

usageobject

Token usage statistics

embeddinginteger

Number of tokens used in text embedding

Response of an image ingestion pipeline.

num_entitiesinteger

Number of images added.

usageobject

Token usage statistics

embeddingstring

Number of tokens used in image embedding

codeinteger

Response code.

dataobject

Payload of the response

resultsoneOf

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.

usageobject

Token usage statistics

embeddinginteger

Number of tokens used in embedding

rerankinteger

Number of tokens used for reranking.

codestring

Response code.

dataobject

Response payload of the deletion pipeline.

num_deleted_chunksintegerrequired

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.

num_deleted_entitiesinteger

Number of deleted entities. This applies to pipelines of the PURGE_IMAGE_INDEX, PURGE_TEXT_INDEX, andPURGEBYEXPRESSION` types.

Returns an error message.

codeinteger

Response code.

messagestring

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
}
}
}