+

Search Tips | Advanced Search

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


Commands for adapters

When we invoke the mfpadm program, we can include various commands for adapters.


The list adapters command

The list adapters command returns a list of the adapters that are deployed for a runtime. Syntax: list adapters [runtime-name]

It takes the following arguments:

Table 1. list adapters command arguments
Argument Description
runtime-name Name of the runtime.

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

Table 2. list adapters options
Option Description
--xml Produce XML output instead of tabular output.


Example

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


The deploy adapter command

The deploy adapter command deploys an adapter in a runtime. Syntax: deploy adapter [runtime-name] file

It takes the following arguments:

Table 3. deploy adapter command arguments
Argument Description
runtime-name Name of the runtime.
file Binary adapter file (.adapter)


Example

This command is based on the Adapter (POST) REST service.


The show adapter command

The show adapter command shows details about an adapter. Syntax: show adapter [runtime-name] adapter-name

It takes the following arguments.

Table 4. show adapter command arguments
Argument Description
runtime-name Name of the runtime.
adapter-name Name of an adapter

The show adapter command takes the following options after the object.

Table 5. show adapter options
Option Description
--xml Produce XML output instead of tabular output.


Example

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


The delete adapter command

The delete adapter command removes (undeploys) an adapter from a runtime. Syntax: delete adapter [runtime-name] adapter-name

It takes the following arguments:

Table 6. delete adapter command arguments
Argument Description
runtime-name Name of the runtime.
adapter-name Name of an adapter.


Example

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


The adapter command prefix

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

Table 7. adapter command prefix arguments
Argument Description
runtime-name Name of the runtime.
adapter-name Name of an adapter.


The adapter get binary command

The adapter get binary command returns the binary adapter file. Syntax: adapter [runtime-name] adapter-name get binary [> tofile]

It takes the following options after the verb.

Table 8. adapter get binary options
Option Description Required Default
> tofile Name of the output file. No Standard output


Example

This command is based on the Export runtime resources (GET) REST service.


The adapter show user-config command

The adapter show user-config command shows the user configuration of the adapter. Syntax: adapter [runtime-name] adapter-name show user-config [--xml]

The adapter show user-config command takes the following options after the verb.

Table 9. adapter show user-config options
Option Description
--xml Produces output in XML format instead of JSON format.


Example

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


The adapter set user-config command

The adapter set user-config command specifies the user configuration of the adapter or a single property within this configuration. Syntax for the entire configuration: adapter [runtime-name] adapter-name set user-config file

The adapter set user-config command takes the following arguments after the verb.

Table 10. adapter set user-config arguments
Option Description
file Name of the JSON or XML file that contains the new configuration.
Syntax for a single property: adapter [runtime-name] adapter-name set user-config property = value

It takes the following arguments after the verb.

Table 11. adapter set user-config arguments
Option Description
property Name of the JSON property. For a nested property, use the syntax prop1.prop2.....propN. For a JSON array element, use the index instead of a property name.
value The value of the property.


Examples

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

Parent topic: Administering MobileFirst applications through the command line