Search code examples
restmaximo

How to reset a date attribute in an object in Maximo REST API


I want to change the deligatefromdate/deligatetodate in the person object in IBM's Maximo REST API. If I want to set a date I use this request: POST maximo/rest/mbo/person/12345/?_format=json&delegatefromdate=2020-12-02

My person object then is returned and the value in delegatefromdate is: "DELEGATEFROMDATE": { "content": "2020-12-02T00:00:00+01:00" }

But now I want to remove the date, I dont want a delegatetodate/delegatefromdate. I have tried:

POST maximo/rest/mbo/person/63006/?_format=json&delegatefromdate=
Value is not changed

POST maximo/rest/mbo/person/63006/?_format=json
Value is not changed

POST maximo/rest/mbo/person/63006/?_format=json&delegatefromdate=null
Error: Error 400: BMXAA4143E - The date format is not valid. Use the date format defined by your locale, or use the calendar control to enter a date.

POST maximo/rest/mbo/person/63006/?_format=json&delegatefromdate=NULL
Error: Error 400: BMXAA4143E - The date format is not valid. Use the date format defined by your locale, or use the calendar control to enter a date.

POST maximo/rest/mbo/person/63006/?_format=json&delegatefromdate=~null~
Error: Error 400: BMXAA4143E - The date format is not valid. Use the date format defined by your locale, or use the calendar control to enter a date.

POST maximo/rest/mbo/person/63006/?_format=json&delegatefromdate=~NULL~
Error: Error 400: BMXAA4143E - The date format is not valid. Use the date format defined by your locale, or use the calendar control to enter a date.

POST maximo/rest/mbo/person/63006/?_format=json&delegatefromdate=0
Date is set to: "2000-12-01T00:00:00+01:00"

I have tried with and without &addchange=

So my question is, how do I clear this date? In the GUI I just erase the value and save and it is gone.


Solution

  • IBM has a record of this problem as APAR IV93341: UNABLE TO UPDATE FIELD TO NULL THROUGH THE MAXIMO REST API. Someone found it on Maximo 7.5.0.7, and the APAR fix was included in 7.6.0.8.