List reports
This operation is deprecated. Please use the "Get Records synchronously by date range" snippet and use the REPORTS-USAGE product. You can also use the "Create Report Asynchronously" snippet with the REPORTS-USAGE product in the payload.
This code snippet shows you how to list all asynchronous report requests with the specified status. If required, you can also specify a date range.
Note that there is a data retention period of 4 days, so reports older than 4 days will not be listed.
Example
| Key | Description |
|---|---|
VONAGE_API_KEY | Your Vonage API key (see it on your dashboard). |
VONAGE_API_SECRET | Your Vonage API secret (also available on your dashboard). |
ACCOUNT_ID | The account ID (same as |
REPORT_STATUS | Status of report generation, can be any of |
If you don't specify a date range, you receive the reports generated over the previous seven days.
Run your code
Save this file to your machine and run it:
Try it out
Set the replaceable variables. Parameter validity may vary with product.
Run the script and you receive a response similar to the following:
Note the report request_id is in the response. Also the file_id, in this case e87a2d7c-abcd-1234-aa45-9bf17a1eb2a1.