Get report status

This code snippet shows you how to obtain the status of a report. It is often used to determine whether a report generation has successfully completed or not.

Example

KeyDescription
VONAGE_API_KEY

Your Vonage API key (see it on your dashboard).

VONAGE_API_SECRET

Your Vonage API secret (also available on your dashboard).

REQUEST_ID

The request ID returned when a report was created

Write the code

Add the following to get-report-status.sh:

View full source

Run your code

Save this file to your machine and run it:

bash get-report-status.sh

Try it out

  1. Set the replaceable variables. Parameter validity may vary with product.

  2. Run the script and you receive a response similar to the following:

The file_id is also returned in the response, in this case e87a2d7c-abcd-1234-aa45-9bf17a1eb2a1. The file_id is used to subsequently download a report Zip file.

See also