Commands for beacons

When you call the wladm Ant task, you can include various commands for the beacons and beacon triggers. A beacon is a piece of information that is associated with an iBeacon. A beacon trigger is an action that a mobile device runs in relation to an iBeacon, when there is an association between the beacon and the beacon trigger.

The list-beacons command

The list-beacons command returns a list of the beacons that match a given UUID and optionally, a given major and minor number. It has the following attributes.
Table 1. list-beacons command attributes
Attribute Description Required Default
uuid UUID (32 hex digits) of the beacons to search for. Only if major or minor are specified wild
major Major number of the beacons to search for. No wild
minor Minor number of the beacons to search for. No wild
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Example:

<list-beacons uuid="496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6"/>

This command is based on the Beacons (GET) REST service.

The set-beacon command

The set-beacon command specifies or updates information about a beacon. It has the following attributes:
Table 2. set-beacon command attributes
Attribute Description Required Default
file Name of the input file. Yes Not available
The input file can be in JSON or XML format. If it is in XML format, it must follow the schema that is given in the file product_install_dir/WorklightServer/wladm-schemas/input/beacon.xsd.

Example:

<set-beacon file="entrance.xml"/>

This command is based on the Beacons (PUT) REST service.

The show-beacon command

The show-beacon command shows details about a beacon. It has the following attributes:
Table 3. show-beacon command attributes
Attribute Description Required Default
uuid UUID (32 hex digits) of the beacon. Yes Not available
major Major number of the beacon. Yes Not available
minor Minor number of the beacon. Yes Not available
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Example:

<show-beacon uuid="496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6" major="1" minor="23"/>

This command is based on the Beacons (GET) REST service.

The remove-beacon command

The remove-beacon command removes (clears) the information about a beacon. It has the following attributes:
Table 4. remove-beacon command attributes
Attribute Description Required Default
uuid UUID (32 hex digits) of the beacon. Yes Not available
major Major number of the beacon. Yes Not available
minor Minor number of the beacon. Yes Not available

Example:

<remove-beacon uuid="496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6" major="1" minor="23"/>

This command is based on the Beacons (DELETE) REST service.

The list-beacon-triggers command

The list-beacon-triggers command returns the list of beacon triggers, belonging to a given runtime. It has the following attributes:
Table 5. list-beacon-triggers command attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Example:

<list-beacon-triggers runtime="worklight"/>

This command is based on the Beacon Triggers (GET) REST service.

The set-beacon-trigger command

The set-beacon-trigger command specifies or updates information about a beacon trigger, belonging to a given runtime. It has the following attributes:
Table 6. set-beacon-trigger command attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
file Name of the input file. Yes Not available
The input file can be in JSON or XML format. If it is in XML format, it must follow the schema that is given in the file product_install_dir/WorklightServer/wladm-schemas/input/beacon-trigger.xsd.

Example:

<set-beacon-trigger runtime="worklight" file="entrance-alert.xml"/>

This command is based on the Beacon Triggers (PUT) REST service.

The show-beacon-trigger command

The show-beacon-trigger command shows details about a beacon trigger, belonging to a given runtime. It has the following attributes:
Table 7. show-beacon-trigger command attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
name Name of the beacon trigger. Yes Not available
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Example:

<show-beacon-trigger runtime="worklight" name="entrance-alert"/>

This command is based on the Beacon Trigger (GET) REST service.

The delete-beacon-trigger command

The delete-beacon-trigger command deletes a beacon trigger from a given runtime. It has the following attributes:
Table 8. delete-beacon-trigger command attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
name Name of the beacon trigger. Yes Not available

Example:

<delete-beacon-trigger runtime="worklight" name="entrance-alert"/>

This command is based on the Beacon Trigger (DELETE) REST service.

The list-beacon-trigger-associations command

The list-beacon-trigger-associations command returns the list of associations between beacons and beacon triggers that match given criteria, belonging to an app in a given runtime. It has the following attributes:
Table 9. list-beacon-trigger-associations command attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
app Name of an app. Yes Not available
uuid UUID (32 hex digits) of the beacon. Only if major or minor are specified  
major Major number of the beacon. No  
minor Minor number of the beacon. No  
triggerName Name of the beacon trigger. No  
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Examples:

<list-beacon-trigger-associations runtime="worklight" app="productguide"/>

<list-beacon-trigger-associations runtime="worklight" app="productguide" uuid="496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6" major="1" minor="23"/>

<list-beacon-trigger-associations runtime="worklight" app="productguide" triggerName="entrance-alert"/>

This command is based on the Associate beacons and triggers (GET) REST service.

The set-beacon-trigger-association command

The set-beacon-trigger-association command specifies an association between a beacon and a beacon trigger, belonging to an app in a given runtime. It has the following attributes:
Table 10. set-beacon-trigger-association command attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
app Name of an app. Yes Not available
uuid UUID (32 hex digits) of the beacon. Yes Not available
major Major number of the beacon. Yes Not available
minor Minor number of the beacon. Yes Not available
triggerName Name of the beacon trigger. Yes Not available

Example:

<set-beacon-trigger-association runtime="worklight" app="productguide" uuid="496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6" major="1" minor="23" triggerName="entrance-alert"/>

This command is based on the Associate beacons and triggers (PUT) REST service.

The show-beacon-trigger-association command

The show-beacon-trigger-association command shows an association between a beacon and a beacon trigger, belonging to an app in a given runtime. It has the following attributes:
Table 11. show-beacon-trigger-association command attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
app Name of an app. Yes Not available
uuid UUID (32 hex digits) of the beacon. Yes Not available
major Major number of the beacon. Yes Not available
minor Minor number of the beacon. Yes Not available
triggerName Name of the beacon trigger. Yes Not available
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Example:

<show-beacon-trigger-association runtime="worklight" app="productguide" uuid="496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6" major="1" minor="23" triggerName="entrance-alert"/>

This command is based on the Associate beacons and triggers (GET) REST service.

The delete-beacon-trigger-association command

The delete-beacon-trigger-association command deletes an association between a beacon and a beacon trigger from an app in a given runtime. It has the following attributes:
Table 12. delete-beacon-trigger-association command attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
app Name of an app. Yes Not available
uuid UUID (32 hex digits) of the beacon. Yes Not available
major Major number of the beacon. Yes Not available
minor Minor number of the beacon. Yes Not available
triggerName Name of the beacon trigger. Yes Not available

Example:

<delete-beacon-trigger-association runtime="worklight" app="productguide" uuid="496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6" major="1" minor="23" triggerName="entrance-alert"/>

This command is based on the Associate beacons and triggers (DELETE) REST service.