Replace a resource with PUT
Medium70 pts~25 min
- HTTP PUT
- Idempotency
Practice app · Acme REST API
A live REST + GraphQL API with auth, validation, pagination, rate limiting and an interactive request console.
Your starter code already declares BASE_URL — call the API relative to it.
Objective
Replace a user you created with PUT, verify the replacement, and prove PUT requires the full representation.
Your task
- 1Create a user with POST BASE_URL + "/users" and capture the id.
- 2PUT BASE_URL + "/users/{id}" with { "name", "email", "role": "viewer" } (all three required) → assert 200 and the new values.
- 3GET the user and assert the replacement persisted.
- 4PUT with only { "name" } → assert 400 VALIDATION_ERROR.
Acceptance criteria
- PUT /users/{id} returns 200
- An incomplete PUT returns 400
- GET /users/{id} returns 200
- At least 3 assertions pass
Constraints
- Use a unique email per run, e.g. qa.<timestamp>@example.test — emails must not already exist (409 EMAIL_TAKEN).
- The practice API is shared in-memory state: only modify users you created yourself.
Fixtures
- apiKey
- tqa_live_key_123
- basicUser
- admin
- basicPassword
- secret
- username
- qa@target.dev
- password
- Test@123
API testing · QA Automation · Requests & methods