Commands for apps

When you call the wladm Ant task, 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 has extended authenticity checking enabled. It has the following attributes:
Table 1. The enable-extended-authenticity command's attributes
Attribute Description Required Default
srcwlappfile Original binary app file (.wlapp, not .apk or .ipa) Yes Not available
devicefile Binary mobile app file (.apk, .appx, .ipa, or .xap) Yes Not available
destwlappfile Output binary app file (.wlapp, not .apk or .ipa) Yes Not available

Example

<enable-extended-authenticity srcwlappfile="myapp-iphone-1.0.wlapp"
    devicefile="MyApp.ipa"
    destwlappfile="myapp-iphone-1.0.extauth.wlapp"/>
Note: 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 runtime. It has the following attributes:
Table 2. The list-apps command's attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Example

<list-apps runtime="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. It has the following attributes:
Table 3. The deploy-app command's attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
file Binary app file (.wlapp, not .apk, or .ipa). Yes Not available

Example

<deploy-app runtime="worklight" file="MyApp-all.wlapp"/>

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

The show-app command

The show-app command returns a list of the apps that are deployed in a runtime. It has the following attributes:
Table 4. The show-app command's attributes
Attribute Description Required Default
runtime Name of the run time web application / MobileFirst project. Yes Not available
name Name of an app. Yes Not available
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Example

<show-app runtime="worklight" name="MyApp"/>

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

The delete-app command

The delete-app command removes (undeploys) an app, with all its app versions, for all environments for which it was deployed, from a runtime. It has the following attributes:
Table 5. The delete-app command's attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
name Name of an app. Yes Not available

Example

<delete-app runtime="worklight" name="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 runtime. It has the following attributes:
Table 6. The delete-app-version command's attributes
Attribute Description Required Default
runtime Name of the runtime web application / MobileFirst project. Yes Not available
name Name of an app. Yes Not available
environment Mobile platform. Yes Not available
version Version of the app. Yes Not available
Note: Deleting an application from MobileFirst Operations Console will remove all push subscriptions on that application as well.

Example

<delete-app-version runtime="worklight" name="MyApp" environment="iphone" version="1.1"/>

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

The app-version command group

The app-version command group has the following attributes:
Table 7. The app-version command's group attributes
Attribute Description Required Default
runtime Name of the run time web application / MobileFirst project. Yes Not available
name Name of an app. Yes Not available
environment Mobile platform. Yes Not available
version Version of the app. Yes Not available
It supports the following elements:
Table 8. The app-version command's group elements
Element Description Count
get-binary Gets the binary data. 0..∞
get-accessrule Gets the access rule. 0..∞
set-accessrule Changes the access rule. 0..∞
get-authenticitycheckrule Gets the authenticity check rule. 0..∞
set-authenticitycheckrule Changes the authenticity check rule. 0..∞
get-lock Gets the lock state. 0..∞
set-lock Changes the lock state. 0..∞

The get-binary command

The get-binary command, inside an <app-version> element, returns the binary file wlapp for a version of an app. It has the following attributes:
Table 9. The get-binary command's attributes
Attribute Description Required Default
tofile Name of the output file. Yes Not available

Example

<app-version runtime="worklight" name="MyApp" environment="iphone" version="1.1">
  <get-binary tofile="/tmp/MyApp.wlapp"/>
</app-version>

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

The get-accessrule command

The get-accessrule command returns the access rule for an app version. It has the following attributes:
Table 10. The get-accessrule command's attributes
Attribute Description Required Default
output Name of a file in which to store the output. No Not applicable
outputproperty Name of an Ant property in which to store the output. No Not applicable

Example

<app-version runtime="worklight" name="MyApp" environment="iphone" version="1.1">
  <get-accessrule output="/tmp/MyApp-accessrule.xml"/>
</app-version>

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

The set-accessrule command

The set-accessrule command changes the access rule for an app version. It has the following attributes:
Table 11. The set-accessrule command's attributes
Attribute Description Required Default
file Name of the input file. Yes Not available

Example

<app-version runtime="worklight" name="MyApp" environment="iphone" version="1.1">
  <set-accessrule file="/tmp/new-accessrule.xml"/>
</app-version>

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

The get-authenticitycheckrule command

The 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. It has the following attributes:
Table 12. The get-authenticitycheckrule command's attributes
Attribute Description Required Default
output Name of a file in which to store the output. No  
outputproperty Name of an Ant property in which to store the output. No  

Example

<app-version runtime="worklight" name="MyApp" environment="iphone" version="1.1">
  <get-authenticitycheckrule output="/tmp/MyApp-authenticitycheckrule.txt"/>
</app-version>

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

The set-authenticitycheckrule command

The 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. It has the following attributes:
Table 13. The set-authenticitycheckrule command's attributes
Attribute Description Required Default
action Action to perform for authenticity checking. Yes Not available
The possible actions are:
  • 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 runtime="worklight" name="MyApp" environment="iphone" version="1.1">
  <set-authenticitycheckrule action="enabled"/>
</app-version>

The get-lock command

The get-lock command returns information about whether an app version is locked or unlocked. It has the following attributes:
Table 14. The get-lock command's attributes
Attribute Description Required Default
output Name of a file in which to store the output. No  
outputproperty Name of an Ant property in which to store the output. No  

Example

<app-version runtime="worklight" name="MyApp" environment="iphone" version="1.1">
  <get-lock output="/tmp/MyApp-lock.txt"/>
</app-version>

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

The set-lock command

The set-lock command sets an app version to locked or unlocked state. It has the following attributes:
Table 15. The set-lock command's attributes
Attribute Description Required Default
lock New lock state. Yes Not available
The possible lock values are true and false.

Example

<app-version runtime="worklight" name="MyApp" environment="iphone" version="1.1">
  <set-lock lock="true"/>
</app-version>

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