API testing

Extract a top-level value

Easy30 pts~12 min
  • JSON extraction
  • Pagination metadata
Practice app · Acme REST API

A live REST + GraphQL API with auth, validation, pagination, rate limiting and an interactive request console.

BASE_URL
/api/practice
Console app
/lab/sdet-extract-a-top-level-value

Your starter code already declares BASE_URL — call the API relative to it.

Objective

Extract top-level pagination fields from GET /users and assert they are consistent.

Your task

  1. 1GET BASE_URL + "/users?page=1&limit=10".
  2. 2Extract total, limit and totalPages into variables.
  3. 3Assert total ≥ 12 (the seed size) and totalPages === ceil(total / limit).

Acceptance criteria

  • GET /users returns 200
  • At least 2 assertions pass

Fixtures

apiKey
tqa_live_key_123
basicUser
admin
basicPassword
secret
username
qa@target.dev
password
Test@123

API testing · SDET · Working with JSON