+

Search Tips   |   Advanced Search

Commands for devices

When we call the wladm Ant task, we can include various commands for devices.


The list-devices command

The list-devices command returns the list of devices that have contacted the apps of a runtime. It has the following attributes:

Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
query A friendly name or user identifier to search for. No
output Name of output file. No
outputproperty Name of Ant property for the output. No
The query parameter specifies a string to search for. All devices that have a friendly name or user identifier containing this string (with case-insensitive matching) are returned.

Examples:

<list-devices runtime="worklight"/>

<list-devices runtime="worklight" query="john"/>

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


The remove-device command

The remove-device command clears the record about a device that has contacted the apps of a runtime. It has the following attributes:

Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
id Unique device identifier. Yes Not available

Example:

<remove-device runtime="worklight" id="496E974CCEDE86791CF9A8EF2E5145B6"/>

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


The device command group

The device command group has the following attributes:

Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
id Unique device identifier. Yes Not available

It supports the following elements:

Element Description Count
set-status Changes the status. 0..∞
set-appstatus Changes the status for an app. 0..∞


The set-status command

The set-status command changes the status of a device, in the scope of a runtime. It has the following attributes:

Attribute Description Required Default
status New status. Yes Not available
The status can be one of:

Example:

<device runtime="worklight" id="496E974CCEDE86791CF9A8EF2E5145B6">
  <set-status status="EXPIRED"/>
</device>

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


The set-appstatus command

The set-appstatus command changes the status of a device, regarding an app in a runtime. It has the following attributes:

Attribute Description Required Default
app Name of an app. Yes Not available
status New status. Yes Not available
The status can be one of:

Example:

<device runtime="worklight" id="496E974CCEDE86791CF9A8EF2E5145B6">
  <set-appstatus app="MyApp" status="DISABLED"/>
</device>

This command is based on the Device Application Status (PUT) REST service.


Parent topic: wladm Ant task