这份文档还在翻译中,预期年底前完成。欢迎您提供宝贵的意见及建议。

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:

Copy to Clipboard
curl -X DELETE -u "$VONAGE_API_KEY:$VONAGE_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