Beacon Trigger (GET)

Retrieves the beacon trigger with the triggerName.

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/trigger-name

Example

https://www.example.com/worklightadmin/management-apis/1.0/runtimes/myruntime/beaconTriggers/mytrigger?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.
trigger-name
The name of the beacon trigger.

Query Parameters

Query parameters are optional.

locale
The locale used for error messages.

Produces

application/json, application/xml, text/xml

Response

The details of the beacon trigger that is retrieved.

JSON Example

{
  "beaconTrigger" : {
    "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"?>
<show-beacon-trigger-result productVersion="7.0.0">
  <beaconTrigger
    dwellingTime="5000"
    proximityState="Near"
    triggerName="DwellInsideLoanSection"
    triggerType="Enter">
    <actionPayload alert="Avail lowest interest rate of just 7.5% on home loans."/>
  </beaconTrigger>
</show-beacon-trigger-result>

Response Properties

The response has the following properties:

beaconTrigger
The beacon trigger that was found.
productVersion
The exact product version.

The beaconTrigger 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.
404
Not Found - No beacon-trigger found with matching triggerName.
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.