Monday, June 15, 2026

MAS Mobile APIs to create, retrieve, update and delete package application in 9.1 or later

MAS Mobile applications interact with Maximo Manage through REST APIs. These APIs can be used to perform Create, Retrieve, Update, and Delete (CRUD) operations on Graphite package applications such as TECHMOBILE, SRMOBILE, INCMOBILE etc., with Workspace admin permission.

Before we begin using the APIs, we need to gather a few values from the MAS application. 

The Workspace ID, Instance ID and Domain values are included in MAS Application Suite URL :  https://<workspaceId>.home.<mas-instance-id>.<mas.domain>/

For example,  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>
Authentication Token Retrieve using Super User Credentials


Authentication Token: We need to obtain a JWT (JSON Web Token) using Super User credentials available from Open Shift console, which can be used in the x-access-token header when accessing MAS APIs.

Super User credentials will be available in MAS Core Project -> Secrets. The Username and password from this resource will be used as Basic Auth for getting the authentication token.


URL:https://api.{mas-instance-id}.{mas.domain}/v1/authenticate

<GET> https://api.dev.iam.np.maximo.com/v1/authenticate
      

Once we have all required values, we can use the MAS Admin and Manage URLs to create, delete or update a mobile application package.  

Create a new package ( using duplicate action )
This API is used to create a custom application by duplicating an existing OOB 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 Techician",
  "appid": "manage",
  "description": "Custom Technician",
  "ismobile": "true"
  }  


Once the API response is successful, the custom application will be created in Application Configuration application. 


We need to publish the application from UI in order to generate the build folder in downloaded app source code for updating package during our development process. 

All Available 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 required for this API.


Delete a package
This API is used to delete a specific package from Maximo Mobile applications. 

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 required 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 includes the complete application source code, all configuration files, and the build folder with compiled artifacts. This package contains everything that is needed to deploy the application in another environment. 


Extract the zip file and locate the compressed file APPNAME__ver-version.zip under <AppName>/build/app/build/ folder

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.

No comments:

Post a Comment