Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Detailed instructions on how to use the EmpathyBroker index API Through Post using CURL instructions.

...

    • Text File (default)

      Code Block
      languagebash
      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:

      • Please note that in @YOUR_FILE the @ denote that is a file, it's mandatory (ex. @my_feed.xml)
      • Content-Type:text/xml -> XML DATA
      • Content-Type:application/json -> JSON DATA
    • INDEX_SERVICE_URL could be:
  • Binary File

    Code Block
    languagebash
    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:

    • Please note that in @YOUR_FILE the @ denote that is a file, it's mandatory (ex. @my_feed.xml)
    • Content-Type:application/zip -> ZIP files
    • Content-Type:application/gzip -> GZIP files


  • Please ask us for another options.other options.

Check indexer jobs

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:

Code Block
languagepowershell
https://preindex.empathybroker.com/services/jobs/INDEX_TOKEN


Filter by label (Content by label)
cqllabel = "empathy-index-api-post-feeds"