+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Commands for devices

When we invoke the mfpadm program, 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. Syntax: list devices [runtime-name] [--query query]

It takes the following arguments:

Table 1. list devices command arguments
Argument Description
runtime-name Name of the runtime.
query A friendly name or user identifier, to search for. This parameter specifies a string to search for. All devices that have a friendly name or user identifier that contains this string (with case-insensitive matching) are returned.

The list devices command takes the following options after the object.

Table 2. list devices command options
Option Description
--xml Produces XML output instead of tabular output.


Examples

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. Syntax: remove device [runtime-name] id

It takes the following arguments:

Table 3. remove device command arguments
Argument Description
runtime-name Name of the runtime.
id Unique device identifier.


Example

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


The device command prefix

The device command prefix takes the following arguments before the verb.

Table 4. device command prefix arguments
Argument Description
runtime-name Name of the runtime.
id Unique device identifier.


The device set status command

The device set status command changes the status of a device, in the scope of a runtime. Syntax: device [runtime-name] id set status new-status

It takes the following arguments:

Table 5. device set status command arguments
Argument Description
new-status New status.
The status can have one of the following values:


Example

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


The device set appstatus command

The device set appstatus command changes the status of a device, regarding an app in a runtime. Syntax: device [runtime-name] id set appstatus app-name new-status

It takes the following arguments:

Table 6. device set appstatus command arguments
Argument Description
app-name Name of an app.
new-status New status.
The status can have one of the following values:


Example

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

Parent topic: Administering MobileFirst applications through the command line