We only really provide a way to log the inbound requests (https://www.ibm.com/support/pages/message-tracking-synchronous-requests). It's worth mentioning this is not good to leave enabled long term due to performance issues it introduces.
I don't know of a way to track the response body of the API requests without modifying the MaximoOslcProviderServlet java class which would be a terrible idea since you can't extend it (like you could with a lot of other core classes). The way we track a request (in the trackSuccessRequest method), the servlet has access to the response body so it shouldn't be too difficult for the product team to add. Potentially, have them add an automation script event here so people could store or log this data in any system they wanted rather than adding it the way we do.
------------------------------
Steven Shull
IBM
------------------------------
Original Message:
Sent: 01-21-2025 12:26
From: André Cordeiro
Subject: OSIN/OSOUT integration automation script with Rest API
Hi Steven,
Thanks for your reply.
The thing here is we would like to know where could we get the final response generated from the Rest API in order to log it.
Would be great if you can give us an simple example.
Thanks
------------------------------
André Cordeiro
Original Message:
Sent: 01-17-2025 08:59
From: Steven Shull
Subject: OSIN/OSOUT integration automation script with Rest API
No, the OSOUT is prior to the response being built. This is a chance for you to manipulate the data that will be used in the response, such as modifying the description without modifying the actual description field on the record. Our best documentation on the OSIN/OSOUT automation script is here: https://ibm-maximo-dev.github.io/maximo-autoscript-documentation/integration/osevents . We describe what is available for both inbound & outbound.
Depending on what you are trying to do, there might be another way to achieve it. For example, if you want to build out a complex attribute that doesn't correspond to an attribute you can use this method: https://ibm-maximo-dev.github.io/maximo-autoscript-documentation/rest/restscriptattr
------------------------------
Steven Shull
IBM
Original Message:
Sent: 01-16-2025 10:14
From: André Cordeiro
Subject: OSIN/OSOUT integration automation script with Rest API
Hi Everyone,
I have a question related to logging Maximo Rest Api Response (Rest Api using Object Structure).
In Scripts related to Object Structures I can access the request in OSIN Scripts.
I would like to know if there is a way to get a hold of the response body in OSOUT Script or if there is another way to get a hold of the response produced by the call to said Rest Api.
Thank you in advanced
#Customizations
#EverythingMaximo
#Integrations
#MaximoApplicationSuite
------------------------------
André Cordeiro
------------------------------