Commands for apps

When you invoke the wladm program, you can include various commands for apps.

The enable extended-authenticity command

The enable extended-authenticity command creates a .wlapp file that is based on an original .wlapp file. But, this new file's extended authenticity property is enabled.

Syntax:
enable extended-authenticity src-wlapp-file device-file > dest-wlapp-file
It takes the following arguments:
Table 1. The enable extended-authenticity command's arguments
Argument Description
src-wlapp-file Original binary app file (.wlapp, not .apk, or .ipa)
device-file Binary mobile app file (.apk, .appx, .ipa, or .xap)
dest-wlapp-file Output binary app file (.wlapp, not .apk, or .ipa)

Example:

enable extended-authenticity myapp-iphone-1.0.wlapp MyApp.ipa > myapp-iphone-1.0.extauth.wlapp
If you are invoking this command from the operating system command line, you need to escape the ">" character so that the command interpreter (shell or cmd.exe) does not intercept it. For example:
wladm enable extended-authenticity myapp-iphone-1.0.wlapp MyApp.ipa ">" myapp-iphone-1.0.extauth.wlapp

This command operates locally, without connecting to the server. For more information about enabling extended app authenticity checking, see Configuring extended app authenticity checking.

The list apps command

The list apps command returns a list of the apps that are deployed in a run time.

Syntax:
list apps [runtime-name]
It takes the following arguments:
Table 2. The list apps command's arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
It takes the following options after the object:
Table 3. The list apps command's options
Option Description
--xml Produce XML output instead of tabular output.
Example:
list apps worklight

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

The deploy app command

The deploy app command deploys an app (possibly with multiple environments) in a run time.

Syntax:
deploy app [runtime-name] file
It takes the following arguments:
Table 4. The deploy app command's arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
file Binary app file (.wlapp, not .apk, or .ipa)
Example:
deploy app worklight MyApp-all.wlapp

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

The show app command

The show app command shows details about an app in a run time, in particular its environments and versions.

Syntax:
show app [runtime-name] app-name
It takes the following arguments:
Table 5. The show app command's arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
app-name Name of an app
It takes the following options after the object:
Table 6. The show app command's options
Option Description
--xml Produce XML output instead of tabular output.
Example:
show app worklight MyApp

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

The delete app command

The delete app command removes (undeploys) an app (from all environments, and all versions) from a run time. Deleting an application from MobileFirst Operations Console will remove all push subscriptions on that application as well.

Syntax:
delete app [runtime-name] app-name
It takes the following arguments:
Table 7. The delete app command's arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project
app-name Name of an app
Example:
delete app worklight MyApp

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

The delete app version command

The delete app version command removes (undeploys) an app version from a run time.

Syntax:
delete app version [runtime-name] app-name environment version
It takes the following arguments:
Table 8. The delete app version command's arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
app-name Name of an app
environment Mobile platform
version Version of the app
Example:
delete app version worklight MyApp iPhone 1.1

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

The app version command prefix

The app version command prefix takes the following arguments before the verb:
Table 9. The app version command's prefix arguments
Argument Description
runtime-name Name of the runtime web application / MobileFirst project.
app-name Name of an app
environment Mobile platform
version Version of the app

The app version get binary command

The app version get binary command returns the binary wlapp file for a version of an app.

Syntax:
app version [runtime-name] app-name environment version get binary [> tofile]
It takes the following arguments after the verb:
Table 10. The app version get binary command's arguments
Argument Description Required Default
> tofile Name of the output file. No Standard output
Example:
app version worklight MyApp iPhone 1.1 get binary > /tmp/MyApp.wlapp

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

The app version get accessrule command

The app version get accessrule command returns the access rule for an app version.

Syntax:
app version [runtime-name] app-name environment version get accessrule
Example:
app version worklight MyApp iPhone 1.1 get accessrule

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

The app version set accessrule command

The app version set accessrule command changes the access rule for an app version.

Syntax:
app version [runtime-name] app-name environment version set accessrule file
It takes the following arguments after the verb:
Table 11. The app version set accessrule command's arguments
Argument Description
file Name of the input file.
Example:
app version worklight MyApp iPhone 1.1 set accessrule /tmp/new-accessrule.xml

This command is based on the App Version Access Rule (PUT) REST service.

The app version get authenticitycheckrule command

The app version get authenticitycheckrule command returns the authenticity check rule for an app version. This command is no longer supported with servers of IBM MobileFirst™ Platform Foundation V7.1.0 or later. This command is only available with V6.2.0 and V6.3.0.

Syntax:
app version [runtime-name] app-name environment version get authenticitycheckrule
Example:
app version worklight MyApp iPhone 1.1 get authenticitycheckrule

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

The app version set authenticitycheckrule command

The app version set authenticitycheckrule command changes the authenticity check rule for an app version. This command is no longer supported with servers of IBM MobileFirst Platform Foundation V7.1.0 or later. This command is only available with V6.2.0 and V6.3.0.

Syntax:
app version [runtime-name] app-name environment version set authenticitycheckrule action
It takes the following arguments after the verb:
Table 12. The app version set authenticitycheckrule command's arguments
Argument Description
action Action to perform for authenticity checking
The following actions are possible:
  • DISABLED: Authenticity is not checked
  • IGNORED: Authenticity is checked, but not enforced. If it fails, only a warning is given and the session is authorized
  • ENABLED: Authenticity is checked and enforced
Example:
app version worklight MyApp iPhone 1.1 set authenticitycheckrule enabled

The app version get lock command

The app version get lock command returns information about whether an app version is locked or unlocked.

Syntax:
app version [runtime-name] app-name environment version get lock
Example:
app version worklight MyApp iPhone 1.1 get lock

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

The app version set lock command

The app version set lock command sets an app version to locked or unlocked state.

Syntax:
app version [runtime-name] app-name environment version set lock lock
It takes the following arguments after the verb:
Table 13. The app version set lock command's arguments
Argument Description
lock New lock state.
The possible lock values are true and false.
Example:
app version worklight MyApp iPhone 1.1 set lock true

This command is based on the App Version Lock (PUT) REST service.