Index documents via subscription
import requests
url = "https://{FUSION HOST}/api/subscription_indexing/{id}/collections/{collection}/index"
payload = [{}]
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Index documents via subscription
Send documents to Kafka for asynchronous indexing through a subscription. The request body contains a list of documents in JSON format. Documents are queued for indexing and processed asynchronously by the subscription indexing service.
POST
/
subscription_indexing
/
{id}
/
collections
/
{collection}
/
index
Index documents via subscription
import requests
url = "https://{FUSION HOST}/api/subscription_indexing/{id}/collections/{collection}/index"
payload = [{}]
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Authorizations
Basic authAPI key
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The subscription ID
The target collection name
Body
application/json
List of documents to index
Response
200 - application/json
Documents successfully queued for indexing
The response is of type object.
Was this page helpful?
⌘I