APIM How to use variables inside a request body?

Copper Contributor

Hi all

How can I make use of variables to dynamically create the request body?

I am using the API management app to allow a REST based platform to send data to a DB making use of SOAP services. This seems to be easily done through the default REST to SOAP APIM option. The DB also requires a separate request to be made to get a session ID to allow connecting to it. Unfortunately, the platform sending the request cannot make multiple requests and I require the session Id fetch to be done within the APIM app.

The problem comes after I have done the send-request and received a sessionId. I now need to use this variable within the body of the transformed request, though it seems like no matter what I enter, it takes everything as text.

 

In essence what I would like to do is with the variable

TiaanS_1-1664186224235.png

Though it seems to always turn it into text

TiaanS_2-1664186281865.png

 

Is it even possible to use variables inside the set-body function? If so, how can I?

 

 

 

 

0 Replies