How to update a record by NextGen REST API?

Created by Cynthia Wang on Wed, 08/14/2019 - 00:58
Published URL:
https://www.ibm.com/support/pages/node/967437
967437

How To


Summary

The new REST APIs for IBM® Maximo® Asset Management are a rewrite of the existing REST APIs that were released after Maximo Asset Management version 7.1, and are integrated in Maximo Asset Management releases starting with version 7.6.0.2.

How to update a record by NextGen REST API?
I will give an example of updating description of an ASSET, which asset number is TEST1.

Steps

1.  Run a query via REST API to get the rest id of ASSET TEST1.

GET: http://hostname/maximo/oslc/os/mxasset?lean=1&oslc.where=assetnum="TEST1"

Header:

MAXAUTH : username:password

You may get encoded "username:password" from link below:

https://www.base64encode.org/

And in the result, I get the rest id: _VEVTVDEvQkVERk9SRA—

2.  Update the description to "test" of the record which assetnum = "TEST1"

POST: http://hostname/maximo/oslc/os/mxasset/_VEVTVDEvQkVERk9SRA--

Headers:

x-method-override : PATCH

properties : *

MAXAUTH : username:password

Body:

description : test

3.  Login Maximo and check Asset TEST1, the original description has been updated to test

Reference:

NEXT GEN API manual:

https://developer.ibm.com/static/site-id/155/maximodev/restguide/Maximo_Nextgen_REST_API.html#_overview

Document Location

Worldwide

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.6, 7.6.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
14 August 2019

UID

ibm10967437