Maximo Open Forum

 View Only
  • 1.  How to pass Dynamic parameters in json rest API call

    Posted 05-11-2021 10:34
    Dear Experts,
    I am new to Maximo. We are implementing json rest API(federated MBO) interface call in one of requirements.

    Requirement:
    When user selects an item in inventory application, then selected item number and site ID should send to SAP system then receive corresponding item details(available of item count in SAP) from SAP system.

    Implementation:

    We have implemented json resources. The json resources created non persistent objects and endpoint.And we created new tap in inventory for UI display Purpose.

    Issue:
    We are facing issues to pass Dynamic parameters to endpoint.

    we tried to pass Dynamic parameters in curly brackets. For example {inventory.itemnum} and {inventory.siteID} in endpoint but it is not working.

    Kindly help us any other way to pass Dynamic parameters in json rest API call from maximo.

    Let me know if you need further information.

    Thanks
    Venkat
    #Integrations
    #Inventory

    ------------------------------
    Venkatrao Y
    TCS
    ------------------------------


  • 2.  RE: How to pass Dynamic parameters in json rest API call

    Posted 05-12-2021 08:23
    Hi Venkat,

    I could have replied to you directly but this may be helpful for others as well.

    I believe you can write a script for the end points to create dynamic endpoint parameters, I have not done it  but I believe someone else here might have done it.

    Having said that,  I would approach this in a different way where you can write a bit of auto script to make it work:
    1. Create a non persistent object and attributes for the required data in a table or dialog.
    2. Create a script which will called from the table or dialog box buttons to call the end point and receive a json response from external system.
    3. Script will use the http hanlder to call the end point.
    4. You can create dynamic url for the http handler from the parent object data.
    5. Once the URL is create , http handler will fetch json data from external system which can used be then easily read and set in to the non persistent object created in step 1.


    ------------------------------
    Biplab Choudhury
    Tata Consultancy Services
    ------------------------------



  • 3.  RE: How to pass Dynamic parameters in json rest API call

    Posted 05-12-2021 08:52
    For JSON resources, on your URL in the endpoint you should be able to reference attr:ATTRIBUTENAME or prop:PROPERTYNAME to get dynamic values. For example, attr:itemnum in your example or prop:mxe.hostname if you were trying to retrieve a value from a system property. I'll be honest, we don't use federated MBOs but if you're having issues with it let me know and I can try to set it up. Most of our integrations

    ------------------------------
    Steven Shull
    Projetech Inc.
    ------------------------------



  • 4.  RE: How to pass Dynamic parameters in json rest API call

    Posted 07-10-2021 07:00
    Thank you Sir Biplab & Steven for your valuable response.

    Our JSON REST API Call is working as expected between our Dev system Test system.

    To pass the dynamic parameters for each request I have tried with attr: inventory.itemnum in endpoint application URL. It is working.

    The End point URL looks Like: http: //host id/maximo/oslc/os/MXINVENTORY?&oslc.where=itemnum=attr:INVENTORY.ITEMNUM&oslc.select=location,siteid,itemnum&pageno=1&lean=1&language=en-US&units=e




    ------------------------------
    Venkatrao Y
    TCS
    ------------------------------