Usage Trigger Management

Create a new usage trigger

POST
/loc/v1/usage/triggers

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
AuthorizationBearer <token>

This is the ThingSpace token, from Credentials and Tokens is used

In: header

VZ-M2M-Token<token>

M2M Session Token (How to generate an M2M session token?)

In: header

Request Body

application/json

License assignment.

License assignment.

triggerName?string

Usage trigger name

accountName*string

Account name

serviceName*serviceName

Service name

Value in

  • "Location"
  • "fota"
thresholdValue*string

The percent of subscribed usage required to activate the trigger, such as 90 or 100.

allowExcess?boolean

Allow additional requests after thresholdValue is reached. (currently not functional)

sendSmsNotification?boolean

Send SMS (text) alerts when the thresholdValue is reached.

smsPhoneNumbers?string

Comma-separated list of phone numbers to send SMS alerts to. Digits only; no dashes or parentheses, etc.

sendEmailNotification?boolean

Send email alerts when the thresholdValue is reached.

emailAddresses?string

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"}