Beacon Triggers (GET)

Retrieves all the beacon triggers.

Roles

Users in the following roles are authorized to perform this operation:

  • worklightadmin
  • worklightdeployer
  • worklightmonitor
  • worklightoperator

Method

GET

Path

/management-apis/1.0/runtimes/runtime-name/beaconTriggers

Example

https://www.example.com/worklightadmin/management-apis/1.0/runtimes/myruntime/beaconTriggers?locale=de_DE

Path Parameters

runtime-name
The name of the runtime. This is the context root of the runtime web application, without the leading slash.

Query Parameters

Query parameters are optional.

locale
The locale used for error messages.

Produces

application/json, application/xml, text/xml

Response

The details of all the beacon triggers that are retrieved.

JSON Example

{
  "beaconTriggers" : [
    {
      "actionPayload" : {
        "alert" : "Avail lowest interest rate of just 7.5% on home loans.",
      },
      "dwellingTime" : 5000,
      "proximityState" : "Near",
      "triggerName" : "DwellInsideLoanSection",
      "triggerType" : "Enter",
    },
    ...
  ],
  "productVersion" : "7.0.0",
}

XML Example

<?xml version="1.0" encoding="UTF-8"?>
<list-beacon-triggers-result productVersion="7.0.0">
  <beaconTriggers>
    <beaconTrigger
      dwellingTime="5000"
      proximityState="Near"
      triggerName="DwellInsideLoanSection"
      triggerType="Enter">
      <actionPayload alert="Avail lowest interest rate of just 7.5% on home loans."/>
    </beaconTrigger>
    ...
  </beaconTriggers>
</list-beacon-triggers-result>

Response Properties

The response has the following properties:

beaconTriggers
The array of the beacon triggers.
productVersion
The exact product version.

The beaconTriggers has the following properties:

actionPayload
The details of the action that is taken when the trigger is activated.
dwellingTime
Available only for triggerTypes: DwellInside and DwellOutside. It is the time in milliseconds that specifies how long the device must be inside, or outside the associated beacon region before the DwellInside or DwellOutside trigger is activated.
proximityState
The proximity state that was specified for the beacon trigger. It is either Immediate, Near, or Far.
triggerName
The unique name of the beacon trigger.
triggerType
The type of beacon trigger. It is either Enter, Exit, DwellInside, or DwellOutside.

The actionPayload has the following properties:

alert
The alert message that is shown on the mobile device of user when this trigger is activated.

Errors

401
Unauthorized - The caller is either not authenticated or not authorized to make this request.
406
Unsupported Accept type - The content type specified in Accept header is not application/json, application/xml or text/xml.
500
An internal error occurred.