Here is a common issue regarding how to add a work log to an SR record through the Maximo REST API. One of the biggest issue or error message is this:
Error 400: commlog#ownerNull
which is also noted here in our forum. This error comes from using this REST url:
This REST call attempts to retrieve the SR record and the associated work logs with the “worklog” relationship. And of course this relationship exists in Maximo but the API for some reason can’t retrieve the work log MBO set. Notice here that the URL is using the ‘/rest/mbo/’ instead of the ‘/rest/os/’. If you don’t know the difference, the ‘mbo’ API attempts to directly use the java MBO’s to retrieve data whereas the ‘os’ API needs to reference any objects that you define as Object Structures in the Integration Framework. So what’s the difference? Well, with the ‘mbo’ you can reference any object defined in your Database Configuration such as WORKORDER, ASSET, LOCATION, PO, etc without having to define anything within the Integration Framework itself, whereas the ‘os’, you need to define an Object Structure such as MXWO, MXPERSON, etc., before you can use it via the REST API. The URL for the ‘os’ would look something like this:
Now depending on how you setup the MXSR object structure, it will return you the data for a single SR record.
So how do you add a new Work Log using this API? Below is the setup for the Object Structure and REST call to add a new Work Log.