Hello,
For performing the bulk update using OSLC JSON Rest API, we need to provide the "resource location". For example, the following cURL performs a bulk update on "person" MBO with the object structure lbl_ds_person (duplicate of mxperson).
curl --location --request POST 'https://maximofac.dev.lbl.gov/maximo/api/os/lbl_ds_person?lean=1&apikey=* \
--header 'Content-Type: application/json' \
--header 'x-public-uri:
https://maximofac.dev.lbl.gov/maximo/api/' \
--header 'x-method-override: BULK' \
--data-raw '[{
"_data": {
"personid": "813149",
"firstname": "Pankaj-1",
"lastname": "Bhide-1",
"displayname": "Bhide,Pankaj",
"supervisor": "016323",
"lbl_org_level_1": "IC",
"lbl_org_level_2": "BS",
"lbl_org_level_3": "E",
"lbl_status": "A",
"department": "None",
"droppoint": null,
"location": null,
"title": "CSE4",
"hiredate": "1997-12-10T00:00:00",
"locationorg": "LBNL",
"locationsite": "FAC",
"_bulkid": "813149"
},
"_meta": {
"uri": null,
"method": "PATCH",
"patchtype": "MERGE"
}
}]'
Please see the value of "url". It is null. As per IBM doc, I need to provide "http://...." locator of this person so that the API can update the row. However in the absence of any value against "uri", the API still updates the row with the supplied values in the payload.
This can easily be reproduced. My question is - whether there is really a need to provide value for the "uri"? Or is this some undocumented feature that if the value of "uri" is null, then API will find out the row from the "key" and update the row?
Did anyone experience the similar?
------------------------------
Pankaj Bhide
Computer Systems Engineer
Berkeley National Laboratory
Berkeley CA
------------------------------
#AssetandFacilitiesManagement#Maximo#MaximoIntegrationandScripting