# Save API Response Data

Effectively manage and analyse API response data within our test case management tool. Capture essential details like response status, response code, and response body for in-depth analysis and validation.

In this section you'll learn how to save the various response data to validate the API response.

#### Save API Response&#x20;

* To save the entire API response, locate the 'Save' option in the response section and select 'Save Response' to save the entire API response payload.
* Assign the extracted value to a parameter for later use. You can also create a new parameter of type [runtime](/introduction-to-parameters/understanding-runtime-parameters.md) and assign.
* After storing the API response, you can custom validate the response key and value, JSON Array and JSON Object using [custom methods](/code-editor.md).

#### Save JSON Key

* Effectively handle dynamic JSON keys within API responses by using "Save JSON Key".
* Determine the JSON key that appears dynamically within the API response and select the "Save JSON Key" option.
* Specify the JSON path to the desired key using a valid JSONPath expression. Assign the extracted value to a parameter for later use. You can also create a new parameter of type [runtime](/introduction-to-parameters/understanding-runtime-parameters.md) and assign.

**Example:**&#x20;

**JSON Response**

In below example JSON key to save email which occurs dynamically in the response would be

```
JSON Path: response.data[1].email
```

```json
{
"page"📑: 2,
"per_page"📑: 6,
"total"📑: 12,
"total_pages"📑: 2,
"data"📑: [
{
"id"📑: 7,
"email"📑: "michael.lawson@reqres.in",
"first_name"📑: "Michael",
"last_name"📑: "Lawson",
"avatar"📑: https://reqres.in/img/faces/7-image.jpg
},
{
"id"📑: 8,
"email"📑: "lindsay.ferguson@reqres.in",
"first_name"📑: "Lindsay",
"last_name"📑: "Ferguson",
"avatar"📑: https://reqres.in/img/faces/8-image.jpg
},
],
"support"📑: {
"url"📑: https://reqres.in/#support-heading,
"text"📑: "To keep ReqRes free, contributions towards server costs are appreciated!"
}
}
```

#### Save Response Status Code, Size and Time&#x20;

When you run a API request in the API Editor, API response should contain response status code, size and time.&#x20;

To save this response data and validate in the same test case or some other test case, click on the respective response and assign the extracted value to a parameter for later use. You can also create a new parameter of type [runtime](/introduction-to-parameters/understanding-runtime-parameters.md) and assign.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.simplifyqa.ai/introduction-to-test-management-in-simplifyqa/learn-api-testing/save-api-response-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
