What is this about?
Detailed instructions on how to use the Empathy Index API Through Post using CURL instructions.
First consult Empathy Index API
Created by Pedro Ondiviela · last update June 11, 2020
Detailed instructions on how to use the Empathy Index API Through Post using CURL instructions.
First consult Empathy Index API
To send a new feed to be indexed you must build a POST request to the following URL (replace constants with the values that the Empathy team has provided to you):
POST INDEX_SERVICE_URL/services/jobs/submit/INDEX_TOKEN/FEED_ID
1
curl -H "Content-Type:text/xml" -d @YOUR_FILE -X POST https://INDEX_SERVICE_URL/services/jobs/submit/INDEX_TOKEN/FEED_ID
You must include the headers according your contents, for example use:
INDEX_SERVICE_URL could be:
1
curl -H"Content-Type:application/zip"--data-binary @YOUR_FILE -X POST https://INDEX_SERVICE_URL/services/jobs/submit/INDEX_TOKEN/FEED_ID
If you use a binary file, like zip or gzip files your must specify a new parameter called --data-binary:
CURL call will return a state of the indexation where it will detail if everything went OK, or there was any kind of error. Sometimes thought, the response will give you an “state: QUEUED” that might not be really clear. In case you want to check an historic of your indexing calls and see if anything is stuck you can access to this:
https://preindex.empathybroker.com/services/jobs/INDEX_TOKEN