Maximo Open Forum

 View Only
  • 1.  MAS Integration

    Posted 20 days ago

    Hi Everyone,

    When I call MAS 9 OSLC API in Postman, I'm getting HTML response instead of JSON/XML.

    Example:
    https://mydomain/maximo/oslc/os/mxapiasset?lean=1

    It seems to return a login/error HTML page instead of API data.

    Has anyone faced this in MAS 9?
    Could you please advise on it?

    Thanks!


    #Infrastructure
    #Integrations
    #MaximoApplicationSuite

    ------------------------------
    Munikrishnan Raji
    comm-it
    ------------------------------


  • 2.  RE: MAS Integration

    Posted 19 days ago

    Replace the /oslc route with /api and use an API Key in the header. Example:

    GET https://mydomain/maximo/api/os/mxapiasset?lean=1&oslc.pageSize=10&oslc.select=assetnum,siteid,description
    apikey: xxxxxxxxxx

    Hope this helps.



    ------------------------------
    Alex Walter
    A3J Group LLC
    ------------------------------



  • 3.  RE: MAS Integration

    Posted 17 days ago

    Hi Alex, Thanks for the response.

    The maximo/api/os is working. Do you know why OSLC isn't working in MAS



    ------------------------------
    Munikrishnan Raji
    comm-it
    ------------------------------



  • 4.  RE: MAS Integration

    Posted 16 days ago

    The /api route is unprotected so that it can operate in a stateless, session-less manner. The /oslc route is protected in that you need an authenticated session. So theoretically you can use the /oslc route if you have a set of cookies from an authenticated session that you pass as headers to the request.

    The majority of the API use cases I've seen are integration use cases and therefore the /api route makes the most sense. However, if you are developing a user interface where a user logs in and performs transactions outside of Maximo, you would likely want to use the /oslc route.

    Hope that helps,



    ------------------------------
    Alex Walter
    A3J Group LLC
    ------------------------------



  • 5.  RE: MAS Integration

    Posted 16 days ago

    Hi Munikrishnan, 

    Bruno Portaluri's Maximo Dev's post, "MIF vs OSLC vs REST vs JSON APIs on the "very insightful explanation by Steven Shull on MoreMaximo forum about of the different types of REST APIs available in Maximo" provides the answer to your question.

    In IBM Maximo Asset Management, the Consumed By field in the Object Structures application dictates which internal module or framework is authorized to use that specific object structure.<sources-carousel-inline ng-version="0.0.0-PLACEHOLDER" _nghost-ng-c3214874120=""> </sources-carousel-inline>

    By defining the "consumer," Maximo isolates the object structure's purpose and dynamically adjusts its behavior, visibility, and available configuration options to fit the specific needs of that module. 

    Maximo's "Consumed By" Values

    • INTEGRATION: This is the most common value. It makes the object structure available to the Maximo Integration Framework (MIF). It allows the structure to be used for enterprise services, publish channels, standard REST APIs, flat-file (CSV) imports/exports, and web services exchanging data with external systems.

    • REPORTING: Exposes the object structure to Maximo's reporting ecosystem. It allows the structure to be used as a Report Object Structure (ROS) for creating Ad Hoc (QBR) reports, downloading Work Center data sets, or integrating with BI tools like Cognos.

    • MIGRATIONMGR: Assigns the object structure to the Migration Manager application. This is used strictly to package, export, and promote configuration data (such as workflows, application design changes, or domains) between different Maximo environments (e.g., moving from Development to Production).

    • OSLC: Makes the object structure available as an OSLC (Open Services for Lifecycle Collaboration) resource. This is heavily used in Maximo Anywhere, Work Centers, and modern Maximo Application Suite (MAS) integrations for lightweight, RESTful data interactions. 

    ------------------------------
    Fredrick Ndwaru
    Perpetual Ignition Inc.
    ------------------------------



    ------------------------------
    FREDRICK NDWARU
    TBD
    ------------------------------



  • 6.  RE: MAS Integration

    Posted 5 days ago

    Hi Alex,

    Thanks for your response.

    I'm currently testing the POST method in Postman. When I send the request in JSON format, it is processed successfully. However, when I send the same request in XML format, Maximo returns a JSON parsing error.

    Do you have any idea why Maximo is trying to parse the XML request as JSON, or is there any additional configuration required to support XML payloads?

    Any guidance would be greatly appreciated.



    ------------------------------
    Munikrishnan Raji
    comm-it
    ------------------------------



  • 7.  RE: MAS Integration

    Posted 4 days ago

    Hi Munikrishnan Raji, 

    The XML formatting lesson is in this playlist. It has been a while, I cannot pinpoint the exact video. https://youtu.be/YaKJfIvQOc4?si=HfQI_XYKuy03Sd_5



    ------------------------------
    [Fredrick] [Ndwaru]
    [Perpetual Ignition]
    ------------------------------



  • 8.  RE: MAS Integration

    Posted 4 days ago

    The /maximo/api/os/<object structure> route is synchronous in nature and only accepts/returns JSON payloads. You cannot pass an XML payload through that route.

    There are other routes that can perform both synchronous and asynchronous transactions that can accept XML. For example, you can define an External System and Enterprise Service and use an XML payload for inbound integration using a URL like:

    https://[hostname]:[port]/meaweb/esqueue/[extsysname]/[enterpriseservicename]

    However, if you're able to use JSON format, the REST/JSON API from IBM is quite good.

    Hope this helps,



    ------------------------------
    Alex Walter
    A3J Group LLC
    ------------------------------



  • 9.  RE: MAS Integration

    Posted 4 days ago

    Is the XML format available as a dropdown option in Postman? The selected format is JSON. Ensure there are no formatting conflicts in your URL also.

    1. URL Structure (GET & POST)

    Maximo APIs require specific base URLs, authentication, and endpoints. Append query parameters directly to the URL. 
    GET Request Example (Query by ID)
    • Fetches a specific Work Order in XML format:
    • https://<maximo_hostname>/maxrest/rest/os/mxwo?wonum=1001&_format=xml 

    POST Request Example (Create Record)

    • Creates a new record and uses lean=1 to prevent null records:
    • https://<maximo_hostname>/maxrest/rest/os/mxwo?lean=1&_format=xml 

    2. Postman Configuration Example

    To run these calls successfully in Postman, follow this setup:
    Step A: Authorization
    1. Open the Authorization tab.
    2. Select Basic Auth from the Type dropdown.
    3. Enter your Maximo Username and Password (or API Key). 

    Step B: Headers

    To ensure Maximo correctly interprets your request and returns XML, set these headers: 
    • Content-Type: application/xml
    • Accept: application/xml 

    Step C: Request Body (For POST)

    1. Open the Body tab.
    2. Select raw and set the format dropdown to XML.
    3. Paste the XML payload mimicking your Maximo Object Structure. 
    Example POST XML Body:
    <?xml version="1.0" encoding="UTF-8"?>
    <SyncMXWO xmlns="http://ibm.com">
        <MXWOSet>
            <WORKORDER>
                <WONUM>1050</WONUM>
                <DESCRIPTION>Emergency Repair</DESCRIPTION>
                <STATUS>WAPPR</STATUS>
            </WORKORDER>
        </MXWOSet>
    </SyncMXWO>


    ------------------------------
    [Fredrick] [Ndwaru]
    [Perpetual Ignition]
    ------------------------------



  • 10.  RE: MAS Integration

    Posted 18 days ago

    Also, in MAS, Object Structure security is enforced, so make sure to explicitly configure object structure security for the object structure you're using (mxapiasset) and grant the sig options to the user, who's API key you're using for authentication. 



    ------------------------------
    Greg Tsarev
    MRM-EAM Consulting Inc.
    ------------------------------



Newest Episode
Ep. 2 | Adding a QR Code to a BIRT Report

Watch Steven Shull walk through how to add a QR code to a BIRT report and make Maximo reporting more scannable, connected, and useful in the field.

MORE by Naviam Episode 2 cover
Watch Episode 2
Also available: Ep. 1 | IBM Maximo Application Suite 9.2