Forum Discussion

Vijayata's avatar
Vijayata
Occasional Contributor
15 years ago

Appending Parameter to REST GET Request

Hi All,

The scenario for me is: I have a First GET REST Request, Which gives me response in json, which can be seen/got in XML format in Soapui. Till here it is fine. But I want one of the response parameter to be appended in second/subsequent GET REST Request. For example; I am getting a attribute called 'GUID' from first request, I want to extract it and append in the Request URL of the next/second REST Request.

For reference (the scenario):
1) First GET REST Request: "http://localhost:8080/csm/staticpool".
2) This gives me response in json/xml with the property as "GUID".
3) This GUID should be appended to the next GET REST Request defined with the endpoint and request url i.e. "http://localhost:8080/csm/staticpool" this is defined GET request (Endpoint+request url) and i want to append the GUID, and the request will look like: "http://localhost:8080/csm/staticpool/<GUID>"

Thanks in advance,
Bye.
  • arunasfo's avatar
    arunasfo
    New Contributor
    I had the same question and from the support team I got to know that this cannot be done.

    However, this is what I did after working through the tests to see if I can pass parameters from one test response to another test request, using global variable
    - Create a global (project) property
    - The response variable from the first request is transferred (Property Transfer) to the project property through property transfer
    - Use the project property as a parameter in the next request

    Hope this helps.