Asynchronous Reporting API using CURL command

This guide demonstrates how to use the Asynchronous Reporting API with the curl command in Repertoire 202x and Ambience 202x.

1.Submit an asynchronous request using the curl command below to add it to the queue. The Ambience/Repertoire Server will return an ID that you can use later to check the status of the rendering job and download the output report

curl -v -H "Authentication: elx.token XXXX" -H "Content-Type: application/json" --data "{\"rml\":\"/ElixirSamples/largereport/rml/transaction_report.rml\", \"mimeType\": \"application/pdf\"}" http://localhost:1730/rml-engine/api/v1/queue-report

Note:
You’ll need to generate an API token from the Repertoire Server for XXXX and update the server’s name accordingly. Highlighted below is the render request ID to be used in step 2:

2.The next step is to send a request to check the status and download the output report, if it’s available, using the ID received in the previous steps.

Below is the output shown that the rendering report still in progress “X-ElxReason: R03 Not yet available”:

3.Repeat the same request from step 2 periodically, to retrieve the rendered report

If a report is available, the request will download the report along with the details of the report generated.