Bulk API in enterprise search

Hey guys, I need some help,

I am trying to index some documents into the cloud enterprise search using bulk api but i keep getting a routing error. Here's the script i wrote:

for FILE in *.json


curl -XPOST '<https-endpoint>/api/as/v1/engines/myengine/documents/_bulk' \

-H 'Content-Type: application/json' \

-H 'Authorization: Bearer private-XXXXXXXXXXXXXXXXX' \

\--data-binary "@${FILE}" 


But i get this error:

{"errors":"Routing Error. The path you have requested is invalid."}

What should I change in the path so it can work ?


Hi Nadir! App Search's API does not have a _bulk endpoint. Here's the documentation for our documents API:

If your JSON files contain 100 or fewer documents each, and each document is smaller than 102kb, you should be able to simply change your endpoint to <https-endpoint/api/as/v1/engines/myengine/documents and POST to there without issue.

If your JSON files contain more than 100 documents per file, you'll need to write some extra batching logic on your end to limit/chunk each individual POST request to 100 docs.

Hope that helps!
