Overview
Send REST or GraphQL requests inside a test and optionally store the response for later steps (status, headers, body).
At a glance
- Request types: REST or GraphQL (GraphQL uses POST and JSON automatically)
- Methods: GET, POST, PUT, DELETE, PATCH
- Inputs: URL, Params, Headers, Body (Raw JSON or Form Data)
- GraphQL: Query, Variables, optional Operation name
- Store result: Save to a response variable for later use
- Expressions: Use environment and expression variables in any field


Common actions
-
GET with params
- Choose REST → Method: GET
- Enter URL → add Params (key/value)
- Optional Headers (e.g., Authorization)
- Set Response variable if you’ll reuse the data
-
POST JSON
- REST → Method: POST
- Headers: Content-Type application/json (+ auth if needed)
- Body: Raw → JSON → paste payload
- Set Response variable
-
PUT with form data
- REST → Method: PUT
- Body: Form Data → add fields
- Add auth header if required
-
GraphQL query
- Select GraphQL → URL = endpoint
- Paste Query and Variables (JSON)
- Optional Operation name → set Response variable
-
GraphQL mutation
- Same as query → paste mutation and input variables
Response examples
When you store a response in a variable (e.g.,apiResponse), you can access the following properties in subsequent steps:
REST API Response
- Status:
${apiResponse.status} - Header:
${apiResponse.headers['content-type']} - Body field:
${apiResponse.body.id} - Nested field:
${apiResponse.body.user.profile.name}
GraphQL Response
- User ID:
${apiResponse.body.data.user.id} - First post title:
${apiResponse.body.data.user.posts[0].title} - Post likes:
${apiResponse.body.data.user.posts[0].likes}
Error Response
- Verify status: Use Verify Value step to assert
${apiResponse.status}equals200 - Check error message:
${apiResponse.body.message}
Common use cases
Using response data in Fill step:Helpful options
- URL preview includes Params automatically
- Content-Type header set based on Body/GraphQL
- Beautify for JSON and GraphQL
- Light/dark editor themes
Troubleshooting
- 401 Unauthorized: Check Authorization header/token and environment variables
- 400 Bad Request: Validate JSON syntax and required fields
- Invalid URL: Include protocol (https://) and correct path
- GraphQL errors: Inspect
errorsalongsidedata - Missing response variable: Ensure a valid name is set and the step passes
Best practices
- Use environment variables for base URLs and tokens
- Request only the fields you need (GraphQL)
- Prefer variables over string interpolation in GraphQL
- Validate expected status codes in a follow-up step
- Never hardcode secrets in tests

