Associate beacons and triggers (GET)

Retrieves the association of beacons and triggers with the UUID, major number, minor number, and triggerName.

Description

The beacons and triggers associations are retrieved based on the following query parameters:
  • None are specified: Returns all beacon and trigger associations of this application.
  • Only triggerName is specified: Returns the associations of the specified trigger with any of the beacons.
  • Only UUID is specified with/without triggerName (major and minor number are not specified): Returns the associations of the specified/any trigger with any of the beacons that have matching UUID.
  • Only UUID and major number are specified with/without triggerName (minor is not specified): Returns the associations of the specified/any trigger with any of the beacons that have matching UUID and major number.
  • Only UUID and minor number are specified with/without triggerName (major is not specified): Returns the associations of the specified/any trigger with any of the beacons that have matching UUID and minor number.
  • UUID, major, and minor number are specified with/without triggerName: Returns the associations of the specified/any trigger with the specified beacon.

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/beaconTriggerAssociations/applications/application-name

Example

https://www.example.com/worklightadmin/management-apis/1.0/runtimes/myruntime/beaconTriggerAssociations/applications/myapplication?errorIfNotFound=true&locale=de_DE&major=1&minor=4439&triggerName=DwellInsideLoanSection&uuid=3d402cf0-3691-4bd9-97ff-0b0a93a160ef

Path Parameters

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

Query Parameters

Query parameters are optional.

errorIfNotFound
If this flag is set to true (default value) with any of the uuid/major/minor/triggerName parameters specified, and there are no matching beacon trigger associations, then 'HTTP 404 Not Found' error is returned instead of an empty list in the output.
locale
The locale used for error messages.
major
The major number of the beacon whose trigger-associations must be fetched.
minor
The minor number of the beacon whose trigger-associations must be fetched.
triggerName
The name of beacon trigger whose beacon-associations must be fetched.
uuid
The UUID of the beacon whose trigger-associations must be fetched.

Produces

application/json, application/xml, text/xml

Response

The details of all the beacon trigger associations that are retrieved.

JSON Example

{
  "beaconTriggerAssociations" : [
    {
      "major" : 1,
      "minor" : 4439,
      "triggerName" : "DwellInsideLoanSection",
      "uuid" : "3d402cf0-3691-4bd9-97ff-0b0a93a160ef",
    },
    ...
  ],
  "productVersion" : "7.0.0",
}

XML Example

<?xml version="1.0" encoding="UTF-8"?>
<list-beacon-trigger-associations-result productVersion="7.0.0">
  <beaconTriggerAssociations>
    <beaconTriggerAssociation
      major="1"
      minor="4439"
      triggerName="DwellInsideLoanSection"
      uuid="3d402cf0-3691-4bd9-97ff-0b0a93a160ef"/>
    ...
  </beaconTriggerAssociations>
</list-beacon-trigger-associations-result>

Response Properties

The response has the following properties:

beaconTriggerAssociations
The array of beacon trigger associations.
productVersion
The exact product version.

The beaconTriggerAssociations has the following properties:

major
The major number of the beacon.
minor
The minor number of the beacon.
triggerName
The unique name of the beacon trigger.
uuid
The UUID of the beacon.

Errors

401
Unauthorized - The caller is either not authenticated or not authorized to make this request.
404
The errorIfNotFound flag is set to true (or not specified) and one of the following conditions happened: a) a beacon with the specified UUID, major, and minor number is not found, or b) the trigger with specified triggerName is not found, or c) no association found between the specified beacon and trigger. If the errorIfNotFound flag is set to false and there are no matching beacon-trigger associations, then an empty list is returned instead of 404 error.
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.