Create a new usage trigger
Create a new usage trigger, which will send an alert when the number of device location service transactions reaches a specified percentage of the monthly subscription amount.
Authorization
thingspace_oauth VZ-M2M-Token This is the ThingSpace token, from Credentials and Tokens is used
In: header
M2M Session Token (How to generate an M2M session token?)
In: header
Request Body
application/json
License assignment.
License assignment.
Usage trigger name
Account name
Service name
Value in
- "Location"
- "fota"
The percent of subscribed usage required to activate the trigger, such as 90 or 100.
Allow additional requests after thresholdValue is reached. (currently not functional)
Send SMS (text) alerts when the thresholdValue is reached.
Comma-separated list of phone numbers to send SMS alerts to. Digits only; no dashes or parentheses, etc.
Send email alerts when the thresholdValue is reached.
Comma-separated list of email addresses to send alerts to.
Response Body
application/json
application/json
curl -X POST "https://example.com/loc/v1/usage/triggers" \ -H "Content-Type: application/json" \ -d '{ "triggerName": "95% usage alert", "accountName": "0212312345-00001", "serviceName": "Location", "thresholdValue": "95", "allowExcess": true, "sendSmsNotification": true, "smsPhoneNumbers": "5551231234", "sendEmailNotification": true, "emailAddresses": "you@theinternet.com" }'{ "triggerId": "595f5c44-c31c-4552-8670-020a1545a84d", "triggerName": "90 percent", "accountName": "1000012345-00001", "serviceName": "Location", "thresholdValue": "90", "allowExcess": true, "sendSmsNotification": true, "smsPhoneNumbers": "5558794321", "sendEmailNotification": false, "emailAddresses": "", "createDate": "2018-08-11", "updateDate": "2018-08-12"}
