SoapUI — API Request Response chaining with JSON

Manul Wickramanayaka
Test Automation Hub
4 min readJun 15, 2021

--

Extracting JSON Response and use it in the next API Request (REST API)

This article shows how to extract value from a JSON response in a REST API and use the value in any other subsequent API Requests in SoapUI

Request1: For a Sample REST-API, let's use this which is giving the list of users. Add a GET request for the below endpoint from SoapUI.

https://reqres.in/api/users?page=2

Request2: Add another request of PUT type, this will update one of the users.

https://reqres.in/api/users/2

Request Body:

{
"name": "morpheus",
"job": "zion resident"
}
Request2

Now create a new TestCase from TestSuite and add the above two APIs to the TestCase

Let's take the first_name from the response of the first API and add that value to the request of our second API.

taking first_name from the response of the first API and add that value to the request of our second API

--

--