Maximo Open Forum

 View Only
  • 1.  How to create work order from PM using REST API

    Posted 07-14-2025 13:16

    I need to create a Maximo work order from a Preventive Maintenance (PM) record using the REST API. I am using the built-in MXPM object structure. My understanding is that you need to use "_action=generateWorkorder" to invoke the action to generate the work order. When I do that, I get a 204 response, but no work order gets created. Are there other parameters or headers needed to get this to work?


    #Integrations

    ------------------------------
    Theo Pozzy
    OneGas
    ------------------------------


  • 2.  RE: How to create work order from PM using REST API

    Posted 07-15-2025 08:52

    I don't think there is a webmethod out of the box to generate work orders from a PM. The syntax wouldn't be _action either. When calling an action, it's a query parameter such as ?lean=1&action=wsmethod:changeStatus. The _action is used in the body when you are trying to define if it's an Add, Change, AddChange, etc. in the bulk API.

    If you open a new tab to /maximo/oas3/api.html?includeactions=1 you can find your object structure and see what actions are available. We don't have MXPM in any of the environments I checked but there is a MXAPIPM. And when I look at that, the only action is changeStatus.

    It is possible to add your own actions via Java class or Automation Script. The automation script example is documented here: IBM Maximo Autoscripting Guide – Object structure action

    I haven't tried to do this myself but I think the method you would need to invoke on the PM is this: Maximo 7.6.1.2 API - PM



    ------------------------------
    Steven Shull
    Naviam
    ------------------------------



  • 3.  RE: How to create work order from PM using REST API

    Posted 07-15-2025 13:06

    As usual, Steven is right-on.

    The other option is to write an automation script that runs the Work Order Generation routine for a PM, and then call that automation script from the REST API as part of your test cases. Something like:

    POST https://<maximourl>/maximo/api/script/WOGEN?lean=1&pmnum=1001&siteid=BEDFORD
    apikey: <apikey>

    ... would call an automation script in Maximo called WOGEN and pass in parameters for PMNUM and SITEID.

    Hope this helps,



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