Maximo

 View Only
  • 1.  Meter Readings from External REST API JSON

    Posted Thu October 13, 2022 04:28 PM
    Hi Everyone,

    I was hoping for some feedback on the best way to build an inbound integration of Meter Readings (odometer values) from an external system's REST API JSON. 

    To get the data needed, we need to do 3 calls to the API:

    • call the AUTH operation to get a token to be user in header of the following requests
    • call the ASSETS operation to get a list of all the vehicles and their "names" (which match our ASSETNUMs in Maximo). Ex:

    • call the STATE operation to get the ODOMETER readings for all the vehicles. Ex:


    Unfortunately we can't get the ASSETNUMs ("name") and odometer readings in a single operation, so we need to do the separate steps above.
    What I have done so far is:

    • created Maximo End Points for each of the operations above
    • created an Automation script that:
      • invokes the end points to retrieve the data
      • parses the JSON
      • then finds the matching Maximo asset and creates a new meter reading from the odometer data (if there's an increase in the value)
        • it does this through the ASSETMETER MboSet
      • created a Cron Task to run the Automation Script on a schedule

    This approach is working so far.

    But I'm wondering if I should have made better use of the MIF through an Enterprise Service, Object Structure, etc. - that way, I could have taken advantage of Message Reprocessing and other benefits of doing so.

    But I wasn't sure how to go about that. (needing to invoke multiple end points / REST API operations then submit the meter readings through an enterprise service or object structure).

    I'd appreciate hearing any suggestions for how you would have tackled this differently.
    Thanks!
    Ryan

    ------------------------------
    Ryan Coghlin
    ------------------------------



    #MaximoIntegrationandScripting
    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: Meter Readings from External REST API JSON
    Best Answer

    IBM Champion
    Posted Mon October 17, 2022 10:45 AM
    HI Ryan - Approach which you have taken actually make senses as it is not efficient to handle multiple calls using involving other MIF components and will complicate the matter.

    Just for sake of using Message Reprocessing if you want to use other MIF Components then you can always check for status code in the responses coming from external API and insert the error into a custom table for error logging. If you are involving queues then we are making process asynchronous which has its own problems to tackle.

    ------------------------------
    Prashant Sharma
    Maximo Solution Architect
    ------------------------------



  • 3.  RE: Meter Readings from External REST API JSON

    Posted Mon October 17, 2022 11:45 AM
    Thanks for the input, Prashant.

    I will keep the custom error logging table in mind.

    ------------------------------
    Ryan Coghlin
    ------------------------------