Skip to main contentIBM Maximo REST API Guide

Sync operation

The following example demonstrates the usage of the SYNC header, which is used when we want to avoid providing the individual asset url (with the rest id) and instead just want to use the collection url. The record is identified by primary keys. If it exists, the action is same as PATCH (or MERGE). If the keys doesn’t match with any existing records, a new record will be created. The same could have been achieved using the asset url with the rest id and a x-method-override value as PATCH.

POST /oslc/os/mxapiasset?lean=1
x-method-override: SYNC
patchtype: MERGE

Post body:

{
"assetnum":"13150",
"siteid":"BEDFORD",
"downtimereport":[
{
"isdowntimereport":"1",
"startdate": "2019-07-17T22:57:56-04:00",
"enddate":"2019-07-17T22:58:59-04:00",
"code":"BRKDWN"