Commands for beacons

When you call the wladm program, 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 executes 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 the list of beacons that match a given UUID and optionally, a given major and minor number.

Syntax:
list beacons [uuid [major minor]]
It takes the following arguments:
Table 1. list beacons command arguments
Argument Description
uuid UUID (32 hex digits) of the beacons to search for.
major Major number of the beacons to search for. Use '_' as a wildcard.
minor Minor number of the beacons to search for. Use '_' as a wildcard.
It takes the following options after the object:
Table 2. list beacons options
Option Description
--xml Produce XML output instead of tabular output.

Example:

list beacons 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.

Syntax:
set beacon file
It takes the following arguments:
Table 3. set beacon command arguments
Argument Description
file Name of the input file.
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 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.

Syntax:
show beacon uuid major minor
It takes the following arguments:
Table 4. show beacon command arguments
Argument Description
uuid UUID (32 hex digits) of the beacon.
major Major number of the beacon.
minor Minor number of the beacon.
It takes the following options after the object:
Table 5. show beacon options
Option Description
--xml Produce XML output instead of tabular output.

Example:

show beacon 496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6 1 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.

Syntax:
remove beacon uuid major minor
It takes the following arguments:
Table 6. remove beacon command arguments
Argument Description
uuid UUID (32 hex digits) of the beacon.
major Major number of the beacon.
minor Minor number of the beacon.

Example:

remove beacon 496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6 1 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.

Syntax:
list beacon-triggers [runtime-name]
It takes the following arguments:
Table 7. list beacon-triggers command arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
It takes the following options after the object:
Table 8. list beacon-triggers options
Option Description
--xml Produce XML output instead of tabular output.

Example:

list beacon-triggers 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.

Syntax:
set beacon-trigger [runtime-name] file
It takes the following arguments:
Table 9. set beacon-trigger command arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
file Name of the input file.
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 worklight 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.

Syntax:
show beacon-trigger [runtime-name] trigger-name 
It takes the following arguments:
Table 10. show beacon-trigger command arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
trigger-name Name of the beacon trigger.
It takes the following options after the object:
Table 11. show beacon-trigger options
Option Description
--xml Produce XML output instead of tabular output.

Example:

show beacon-trigger worklight 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.

Syntax:
delete beacon-trigger [runtime-name] trigger-name
It takes the following arguments:
Table 12. delete beacon-trigger command arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
trigger-name Name of the beacon trigger.

Example:

delete beacon-trigger worklight 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.

Syntax:
list beacon-trigger-associations [runtime-name] app-name [uuid major minor] [trigger-name]
It takes the following arguments:
Table 13. list beacon-trigger-associations command arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
app-name Name of an app.
uuid UUID (32 hex digits) of the beacon.
major Major number of the beacon. Use '_' as a wildcard.
minor Minor number of the beacon. Use '_' as a wildcard.
trigger-name Name of the beacon trigger.
It takes the following options after the object:
Table 14. list beacon-trigger-associations options
Option Description
--xml Produce XML output instead of tabular output.

Examples:

list beacon-trigger-associations worklight productguide

list beacon-trigger-associations worklight productguide 496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6 1 23

list beacon-trigger-associations worklight productguide 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.

Syntax:
set beacon-trigger-association [runtime-name] app-name uuid major minor trigger-name
It takes the following arguments:
Table 15. set beacon-trigger-association command arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
app-name Name of an app.
uuid UUID (32 hex digits) of the beacon.
major Major number of the beacon.
minor Minor number of the beacon.
trigger-name Name of the beacon trigger.

Example:

set beacon-trigger-association worklight productguide 496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6 1 23 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.

Syntax:
show beacon-trigger-association [runtime-name] app-name uuid major minor trigger-name
It takes the following arguments:
Table 16. show beacon-trigger-association command arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
app-name Name of an app.
uuid UUID (32 hex digits) of the beacon.
major Major number of the beacon.
minor Minor number of the beacon.
trigger-name Name of the beacon trigger.
It takes the following options after the object:
Table 17. show beacon-trigger-association options
Option Description
--xml Produce XML output instead of tabular output.

Example:

show beacon-trigger-association worklight productguide 496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6 1 23 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.

Syntax:
delete beacon-trigger-association [runtime-name] app-name uuid major minor trigger-name
It takes the following arguments:
Table 18. delete beacon-trigger-association command arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
app-name Name of an app.
uuid UUID (32 hex digits) of the beacon.
major Major number of the beacon.
minor Minor number of the beacon.
trigger-name Name of the beacon trigger.

Example:

delete beacon-trigger-association worklight productguide 496E-974C-CEDE-8679-1CF9-A8EF-2E51-45B6 1 23 entrance-alert

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