Cancel report

This code snippet shows you how to cancel the creation of a report.

Example

Variable Required Description
NEXMO_API_KEY Yes Your API key which you can obtain from your Dashboard.
NEXMO_API_SECRET Yes Your API secret which you can obtain from your Dashboard.
REQUEST_ID Yes The request ID of the report to cancel creation of.

Write the code

Add the following to cancel-report.sh:

Copy to Clipboard
curl -X DELETE -u "$NEXMO_API_KEY:$NEXMO_API_SECRET" \
     "https://api.nexmo.com/v2/reports/$REQUEST_ID"

View full source

Run your code

Save this file to your machine and run it:

bash cancel-report.sh

Try it out

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

  2. Run the script to cancel the report.

See also