MAS Mobile applications interact with Maximo Manage through REST APIs. In MAS 9.1 and later, these APIs can be used to perform Create, Retrieve, Update, and Delete (CRUD) operations on Graphite package applications such as TECHMOBILE, SRMOBILE, INCMOBILE, etc., Access to these operations requires System or Workspace Administrator privileges.
By leveraging these APIs, Mobile Application deployments can be automated as part of a DevOps pipeline.
To use these APIs, a few configuration values must be obtained from the MAS environment.
The Workspace ID, Instance ID and Domain values can be derived from the MAS Application Suite URL : https://<workspaceId>.home.<mas-instance-id>.<mas.domain>/
For example, if you access your MAS UI via https://main.home.dev.iam.np.maximo.com/
where
| <workspaceId> |
main |
| <mas-instance-id> |
dev.iam.np |
| <mas.domain> |
maximo.com |
| <manage-url> |
<workspaceId>.manage.<mas-instance-id>.<mas.domain> |
| SuperUser Credentials |
Stored in OpenShift Cluster |
| Authentication Token |
Retrieve using Super User Credentials |
Super User credentials Super User credentials are available
in the OpenShift cluster under the MAS Core project's Secrets
configuration. The Username and password from this resource
will be used as Basic Auth for getting the authentication token.
Authentication Token:
Almost of all the REST APIs for performing Suite administration operations use token based authentication. The token is provided via the x-access-token header of each request. An exception is the v1/authenticate endpoint which uses HTTP Basic Authentication.
To obtain a JWT (JSON Web Token) for authenticating MAS Admin REST APIs, we must use Super User credentials available from Open Shift console via GET request to endpoint v1/authenticate. It will issue a time limited token in the response which can be used in the x-access-token header when interacting with other APIs.
URL:https://api.{mas-instance-id}.{mas.domain}/v1/authenticate
<GET> https://api.dev.iam.np.maximo.com/v1/authenticate

Once all the required values have been collected, the MAS Admin and Maximo Manage APIs can be used to create, update, or delete Mobile Application packages.
Create a new package ( using duplicate action )
This API creates a custom Mobile application package by duplicating an existing OOB (out of the box) application.
URL:https://api.{mas-instance-id}.{mas.domain}/graphite/configtool/packages/?workspaceId=<frommasurl>
<POST>https://api.dev.iam.np.maximo.com/graphite/configtool/packages?workspaceId=main
In Request Body, choose raw and select JSON format with below sample input for duplicating mobile application.
Sample JSON Request Payload
{
"packageid": "customtechmobile",
"originalpackageid": "techmobile",
"version": "9.1.22.0",
"name": "Custom Technician",
"appid": "manage",
"description": "Custom Technician",
"ismobile": "true"
}
Once the API response is successful, the custom application will be created in Application Configuration application.
The application must be published from the Application Configuration UI before downloading the package. Publishing generates the build artifacts required for deployment.
Retrieve package list
This API will list all the available mobile applications in MAS.
URL:https://api.{mas-instance-id}.{mas.domain}/graphite/configtool/packages/?workspaceId=<frommasurl>
<GET>https://api.dev.iam.np.maximo.com/graphite/configtool/packages?workspaceId=main
No Request Body is needed for this API.
Update a package
MAS Admin API for update package is not supported by IBM, even though it's published in IBM API documentation. So, we are using manage URL upload action.
We can download the app source code from the Application Administrator -> Application Configuration Mobile application.
The downloaded ZIP file contains the complete application source code, configuration files, and the build directory with compiled artifacts. This package includes everything required to deploy the application to another environment.
Extract the zip file and locate the deployment package APPNAME__ver-version.zip in this <AppName>/build/app/build/ directory.
If build folder is missing in the downloaded ZIP file, ensure that the application is published before downloading.
Upload the compressed file using Object Structure OSLCMAFAPPDATA Manage API.
URL:https://{workspaceId}.manage.{mas-instance-id}.{mas.domain}/maximo/api/os/OSLCMAFAPPDATA?appid=<packageName>&action=wsmethod:uploadFile&version=<versionno>&apikey=<apikey>
<POST>https://main.manage.dev.iam.np.maximo.com/maximo/api/os/OSLCMAFAPPDATA?appid=CUSTOMTECHMOBILE&action=wsmethod:uploadFile&version=9.1.22.0&apikey=sg38w0fpli2fqdpi86fl2s6p3hdunqt724itim8h
In Request Body, choose binary and select the compressed zip downloaded from MAS UI.
After uploading the compressed file, refresh the application using Redownload option to view the latest code.
Delete a package
This API deletes a specific Mobile package application from the workspace.
URL:https://api.{mas-instance-id}.{mas.domain}/graphite/configtool/packages/<packageName>?workspaceId=<frommasurl>
<DELETE>https://api.dev.iam.np.maximo.com/graphite/configtool/packages/CUSTOMMOBILE?workspaceId=main&appid=manage
No Request Body is needed for this API.