Commands for adapters

When you invoke the wldam program, you 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 web application / MobileFirst project.
It takes the following options after the object:
Table 2. list adapters options
Option Description
--xml Produce XML output instead of tabular output.
Example:
list adapters worklight

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 web application / MobileFirst project.
file Binary adapter file (.adapter)
Example:
deploy adapter worklight MyAdapter.adapter

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 web application / MobileFirst project.
adapter-name Name of an adapter
It takes the following options after the object:
Table 5. show adapter options
Option Description
--xml Produce XML output instead of tabular output.
Example:
show adapter worklight MyAdapter

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 web application / MobileFirst project.
adapter-name Name of an adapter
Example:
delete adapter worklight MyAdapter

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 web application / MobileFirst project.
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:
adapter worklight MyAdapter get binary > /tmp/MyAdapter.adapter

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