+

Search Tips | Advanced Search

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


Commands for apps

When we call the mfpadm Ant task, you can include various commands for apps.


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 1. list-apps command attributes
Attribute Description Required Default
runtime Name of the runtime. Yes Not available
output Name of the output file. No Not applicable
outputproperty Name of the Ant property for the output. No Not applicable


Example

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


The deploy-app command

The deploy-app command deploys an app version in a runtime. It has the following attributes.

Table 2. deploy-app command attributes
Attribute Description Required Default
runtime Name of the runtime. Yes Not available
file The application descriptor, a JSON file. Yes Not available


Example

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


The show-app command

The show-app command returns a list of the app versions that are deployed in a runtime. It has the following attributes.

Table 3. show-app command attributes
Attribute Description Required Default
runtime Name of the runtime. Yes Not available
name Name of an app. Yes Not available
output Name of output file. No Not applicable
outputproperty Name of Ant property for the output. No Not applicable


Example

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 4. delete-app command attributes
Attribute Description Required Default
runtime Name of the runtime. Yes Not available
name Name of an app. Yes Not available


Example

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


The show-app-version command

The show-app-version command shows details about an app version in a runtime. It has the following attributes.

Table 5. show-app-version command attributes
Attribute Description Required Default
runtime Name of the runtime. Yes Not available
name Name of the app. Yes Not available
environment Mobile platform. Yes Not available
version Version number of the app. Yes Not available


Example

This command is based on the Application Version (GET) 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. delete-app-version command attributes
Attribute Description Required Default
runtime Name of the runtime. 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

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


The app command group

The app command group has the following attributes.

Table 7. app command group attributes
Attribute Description Required Default
runtime Name of the runtime. Yes Not available
name Name of an app. Yes Not available

The app command group supports the following elements.

Table 8. app command group elements
Element Description Count
show-license-config Shows the token license configuration. 0..
set-license-config Specifies the token license configuration. 0..
delete-license-config Removes the token license configuration. 0..


The show-license-config command

The show-license-config command shows the token license configuration of an app. It has the following attributes.

Table 9. show-license-config command attributes
Attribute Description Required Default
output Name of a file in which to store the output. Yes Not available
outputproperty Name of an Ant property in which to store the output. Yes Not available


Example

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


The set-license-config command

The set-license-config command specifies the token license configuration of an app. It has the following attributes.

Table 10. set-license-config command attributes
Attribute Description Required Default
appType Type of app: B2C or B2E Yes Not available
licenseType Type of application: APPLICATION or ADDITIONAL_BRAND_DEPLOYMENT or NON_PRODUCTION. Yes Not available


Example

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


The delete-license-config command

The delete-license-config command resets the token license configuration of an app, that is, reverts it to the initial state.


Example

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


The app-version command group

The app-version command group has the following attributes.

Table 11. app-version command group attributes
Attribute Description Required Default
runtime Name of the runtime. 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

The app-version command group supports the following elements:

Table 12. app-version command group elements
Element Description Count
get-descriptor Gets the descriptor. 0..
get-web-resources Gets the web resources. 0..
set-web-resources Specifies the web resources. 0..
get-authenticity-data Gets the authenticity data. 0..
set-authenticity-data Specifies the authenticity data. 0..
delete-authenticity-data Deletes the authenticity data. 0..
show-user-config Shows the user configuration. 0..
set-user-config Specifies the user configuration. 0..


The get-descriptor command

The get-descriptor command, inside an <app-version> element, returns the application descriptor of a version of an app. It has the following attributes.

Table 13. get-descriptor command 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

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


The get-web-resources command

The get-web-resources command, inside an <app-version> element, returns the web resources of a version of an app, as a .zip file. It has the following attributes.

Table 14. get-web-resources command attributes
Attribute Description Required Default
tofile Name of the output file. Yes Not available


Example

This command is based on the Retrieve Web Resource (GET) REST service.


The set-web-resources command

The set-web-resources command, inside an <app-version> element, specifies the web resources for a version of an app. It has the following attributes.

Table 15. set-web-resources command attributes
Attribute Description Required Default
file Name of the input file (must be a .zip file). Yes Not available


Example

This command is based on the Deploy a web resource (POST) REST service.


The get-authenticity-data command

The get-authenticity-data command, inside an <app-version> element, returns the authenticity data of a version of an app. It has the following attributes.

Table 16. get-authenticity-data command 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

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


The set-authenticity-data command

The set-authenticity-data command, inside an <app-version> element, specifies the authenticity data for a version of an app. It has the following attributes.

Table 17. set-authenticity-data command attributes
Attribute Description Required Default
file Name of the input file:

  • Either a authenticity_data file,
  • or a device file (.ipa, .apk, or .appx file), from which the authenticity data is extracted.

Yes Not available


Examples

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


The delete-authenticity-data command

The delete-authenticity-data command, inside an <app-version> element, deletes the authenticity data of a version of an app. It has no attributes.


Example

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


The show-user-config command

The show-user-config command, inside an <app-version> element, shows the user configuration of a version of an app. It has the following attributes.

Table 18. show-user-config command attributes
Attribute Description Required Default
format Specifies the output format. Either json or xml. Yes Not available
output Name of the output file. No Not applicable
outputproperty Name of the Ant property for the output. No Not applicable


Examples

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


The set-user-config command

The set-user-config command, inside an <app-version> element, specifies the user configuration for a version of an app. It has the following attributes for setting the entire configuration.

Table 19. set-user-config command attributes
Attribute Description Required Default
file Name of the JSON or XML file that contains the new configuration. Yes Not available

The set-user-config command has the following attributes for setting a single property in the configuration.

Table 20. set-user-config command attributes
Attribute Description Required Default
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. Yes Not available
value The value of the property. Yes Not available


Examples

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

Parent topic: Administering MobileFirst applications through Ant