Trying to think through the best way to do this…
Basically, I need to make a PUT request to an endpoint with one or two minor changes. The rest of the data will remain the same as it originally exists just a moment before. Since the data will vary depending on the endpoint and what currently exists, my thoughts for the best way to accomplish this are as follows (just not sure how to translate into my Scenario completely).
- HTTP GET
- Text aggregator (or similar) to extract the entire body response json {xxxx}
- Output of this entire body as w/ ability to remap only particular parts of the body that I assign, let’s say adding a new “variable_4_value” = “new_input” for example, along with changing “variable_3_value” = “updated_value”.
- HTTP PUT with new body json (old + whatever variables I changed).
The key is for it to be dynamic (+my variable changes), since some fields may be added/removed later, so it should always use whatever comes from the initial GET request to ensure accuracy and that no data gets left out during PUT update.
However, I’m stuck on basically everything from 2-4. I know I can map the json manually, but there are hundreds of lines in the body, and again, it will change from time to time, so I definitely don’t want to go that route. And if I can extract the body text, that solves the first problem, but then how do redefine a variable value, or add a new one then merge that change into the existing body for the PUT request?
Thanks in advance for your input! (No scenario because it’s not built yet, but I’ve attached the sample output bundle from the GET request, and a sample input bundle that I want to use for my PUT request. In this specific example, the only variable I need to change is adding a “jobId” which I’m mapping from a prior step.
PUT_Input.json (2.4 KB)
GET_Output.json (7.3 KB)