Editing this 7/24--I had an error in my initial query params in a GET which was causing the multi-record return not to include desired values. Getting however many related values via oslc.select using relationship.attribute notation solves my immediate requirement.
I'll circle back if needed to the question below of how to do variable assignment from mbo structure followed by json parse / reserialize outbound only if the query param option isn't viable.
--
I've been looking at the documentation for manipulating outbound (Rest/JSON) message bodies and am still unsure the functions or functions for adding a new attr:value pair in the outbound message via OSOUT script, and when based on a value looked up from the mbo--
eg, when you want to include displaynames in a response for an object that has only user ids, and you've run into the issue with only one join to the same table from a parent on the OS. MBO includes IDs and we want to include displaynames in the outbound message
- approver.displayname
- pm.displayname
- owner.displayname
- certifier.displayname
- etc.
------------------------------
Robert Matthews
------------------------------
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
------------------------------