IBM Support

How to create a service request and a follow-up work order using REST API

How To


Summary

Use Postman to send API request to create a service request and a follow-up work order

Steps

1) Go to POSTMAN application
Send a POST URL to create a service request

http://hostname:port/maximo/oslc/os/mxsr/?lean=1

Headers:

maxauth:     bWF4YWRtaW46bWF4YWRtaW4=
Content-Type:   application/json
properties:        ticketid, reportedby, assetnum, reportedphone, reportedemail, location, affectedpersonid, reportdate, description

image-20230526092751-1

Body:

 

Body:
{
"reportedby": "WILSON",
"assetnum": "11470",
"location": "REPAIR",
"affectedpersonid": "WILSON",
"description": "Hello Angela2",
"SITEID": "BEDFORD"
}

image-20230526093119-2

Output:

{
    "_rowstamp": "5012061",
    "assetnum": "11470",
    "reportdate": "2023-05-23T22:20:36-07:00",
    "reportedphone": "(617) 555-9017",
    "description": "Hello Angela2",
    "location": "REPAIR",
    "reportedemail": "m.wilson@helwig.com",
    "href": "http://hostname:port/maximo/oslc/os/mxsr/_U1IvMTIwNg--",
    "reportedby": "WILSON",
    "ticketid": "1206"
}

image-20230526093914-1

 

RESULTS: Service request 1206 is created in Maximo

2) Click the link in the href from the output. 

Append to the end of the URL:  

?action=wsmethod:createWorkorder

POST URL:

http://hostname:port/maximo/oslc/os/mxsr/_U1IvMTIwNg--?action=wsmethod:createWorkorder

Headers:

maxauth:                         bWF4YWRtaW46bWF4YWRtaW4=
x-method-override:             PATCH
Content-Type:                  application/json
 

RESULTS:  Go to Maximo > Service Request application > Go to the new SR > Related Records tab

It creates a Service Request with a related work order

image-20230526102022-1

 

Additional Information

Log in to Maximo

Open a new browser tab and enter URL:

https://hostname:port/maximo/oslc/os/mxapisr?oslc.where=ticketid=%221001%22&oslc.select=allowedactions

When we send the API MXAPISR request, it results in a list of available wsmethods: 

 

image-20230526105336-1

"wsmethod:reprocessTkTemplateSortOrder"
"wsmethod:createWorkorder"
"wsmethod:createIssueToSR"
"wsmethod:managerSpecifications"
"wsmethod:createNewWorkorder"
"wsmethod:getWorkLog"
"wsmethod:changeStatus"
"wsmethod:managerEmailGuestUser"
"wsmethod:managerDomainGuestUser"
"wsmethod:createTicket"
"wsmethod:updateTicketTemplate"
 

Document Location

Worldwide

[{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"ARM Category":[{"code":"a8m0z000000GpMWAA0","label":"Integration-\u003ERest API"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Type":"MASTER"},{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSWT9A","label":"IBM Control Desk"},"ARM Category":[{"code":"","label":""}],"Platform":[{"code":"","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
12 July 2026

UID

ibm16998659