Commands for beacons
When we call the wladm program, we 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:
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:
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:
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 MF_HOME/WorklightServer/wladm-schemas/input/beacon.xsd.
Argument Description file Name of the input file. 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:
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:
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:
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:
Argument Description runtime-name Name of the runtime web application / MobileFirst project. It takes the following options after the object:
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:
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 MF_HOME/WorklightServer/wladm-schemas/input/beacon-trigger.xsd.
Argument Description runtime-name Name of the runtime web application / MobileFirst project. file Name of the input file. 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:
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:
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:
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:
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:
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:
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:
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:
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:
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.
Parent topic: Administer MobileFirst applications through the command line