Cancel report
This code snippet shows you how to cancel the creation of a report.
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). |
REQUEST_ID | The request ID returned when a report was created |
Write the code
Add the following to cancel-report.sh:
curl -X DELETE -u "$VONAGE_API_KEY:$VONAGE_API_SECRET" \
"https://api.nexmo.com/v2/reports/$REQUEST_ID"Run your code
Save this file to your machine and run it:
bash cancel-report.sh
Try it out
Set the replaceable variables. Parameter validity may vary with product.
Run the script to cancel the report.