Get Triggers v2

GET /v2/triggers
GET /v2/triggers/{triggerId}
GET /v2/triggers/accounts/{accountName}
GET /v2/triggers/categories/{triggerCategory}

Retrieves trigger information about:

  • all triggers that the current user has access to, which may include multiple accounts
  • a specified trigger
  • all triggers in a given account
  • all triggers by trigger category

Contents

See also:
Create a Trigger
Update a Trigger
Delete a Trigger

Request Components

HTTP Request

GET https://thingspace.verizon.com/api/m2m/v2/triggers

GET https://thingspace.verizon.com/api/m2m/v2/triggers/{triggerId}

GET https://thingspace.verizon.com/api/m2m/v2/triggers/accounts/{accountName}

GET https://thingspace.verizon.com/api/m2m/v2/triggers/categories/{triggerCategory}

Resource and Query Parameters

Use GET /v2/triggers to retrieve all triggers that you have access to, or specify a trigger ID to get a single trigger. Use GET /v2/triggers/accounts/{accountName} to get all the triggers in an account or GET /v2/triggers/categories/{triggerCategory} to find all the triggers you have access to for a category.

Parameter Name Data Type Description
triggerId
optional
string The UUID of a specific trigger to get information about that trigger. If the request does not include a triggerId, the response will include all triggers that the current user has access to.
accountname
optional
string A Verizon billing account name, to retrieve all triggers that belong to that account. An account name is usually numeric, and must include any leading zeros.
triggerCategory string The type of usage that the trigger responds to:
  • DeviceSmsUsage - The number of SMS (text) messages sent by and/or to a device
  • DeviceDataUsage - The amount of data sent by a device
  • DeviceSessionTime - The duration of session connections
  • PromoAlerts - New triggers created for Real Time Rating / Intelligent Alerts (RTR/IA)

Header Parameters

The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token, and must set the content-type to JSON.

Parameter Name Data Type Description
Authorization
required
string HTTP Authorization bearer token.
VZ-M2M-Token
required
string A valid session token returned by POST /session/login.
Content-Type
required
string Must be application/json.

Request Body

None.

Success Responses

A success response includes a triggers array that contains all triggers that matched the request.

Status 200

Parameter Name Data Type Description
triggers array A array of trigger objects for each trigger that matched the request
triggers.triggerId string The unique ID of the trigger
triggers.triggerName string User defined name of the trigger
triggers.accountName string The name of the account that the trigger is associated with
triggers.organizationName string The name of the organization or group that the trigger is associated with
triggers.triggerCategory string The type of usage that the trigger responds to:
  • DeviceSmsUsage - The number of SMS (text) messages sent by and/or to a device
  • DeviceDataUsage - The amount of data sent by a device
  • DeviceSessionTime - The duration of session connections
  • PromoAlerts - New triggers created for Real Time Rating / Intelligent Alerts (RTR/IA)
triggers.extendedAttributes string Placeholder for future use. All queries will return "Null"
triggers.createdAt $date-Time The date and time that the trigger was created
triggers.modifiedAt $date-Time The date and time that the trigger was last modified

Example Response for Promo Alerts

{
    "triggers":[
        {
            "triggerId":"be1b5958-3e11-41db-9abd-b1b7618c0035",
            "triggerName":"User defined name of the trigger",
            "accountName":"0000123456-00001",
            "organizationName":"User defined name for organization or group",
            "triggerCategory":"PromoAlerts",
            "extendedAttributes":null,
            "createdAt":"2018-03-02T17:51:13-05:00",
            "modifiedAt":"2018-03-02T17:51:13-05:00"
        },
        {
            "triggerId":"BA845545-A21B-43AA-8998-1902F1381BA6",
            "triggerName":"User defined name of the trigger",
            "accountName":"0000123456-00001",
            "organizationName":"User defined name for organization or group",
            "triggerCategory":"PromoAlerts",
            "extendedAttributes":null,
            "createdAt":"2018-03-02T17:51:13-05:00",
            "modifiedAt":"2018-03-02T17:51:13-05:00"
        },
        {
            "triggerId":"03B0B1DF-B059-4836-8A9C-D8D6B0C9330B",
            "triggerName":"User defined name of the trigger",
            "accountName":"0000123456-00001",
            "organizationName":"User defined name for organization or group",
            "triggerCategory":"PromoAlerts",
            "extendedAttributes":null,
            "createdAt":"2018-03-02T17:51:13-05:00",
            "modifiedAt":"2018-03-02T17:51:13-05:00"
        }
    ]
}
 

Failure Responses

Status 400

All error messages are returned in this format:

{
  "errorCode": "error code string",
  "errorMessage": "error message string"
}

Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.

Try It Out!