InterviewDryRun
QA interview · Asked at junior, mid and senior level

How would you test a REST API?

How the interviewer asks it

“A new REST endpoint creates a booking and returns it. Describe how you would test it: the cases, the data, the status codes you expect, and how you would automate it.”

Typed drills are free and unlimited: the AI scores your answer against the outline below.

What the interviewer is looking for

  • Contract checks: request and response schema, headers, status codes.
  • Validation and error cases with the right 4xx codes.
  • Authentication and authorisation, including another user's booking.
  • Business rules and side effects: the booking really exists, no double booking.
  • An automation approach that runs in CI with isolated test data.

How to structure your answer

  1. 01

    Understand the contract

    Read the spec: fields, rules, status codes and side effects.

  2. 02

    Happy path

    201 Created, the body matches the schema, a follow-up GET returns the same booking.

  3. 03

    Negative cases

    Missing and invalid fields (400), no token (401), wrong user (403), unknown resource (404), conflicts (409).

  4. 04

    Robustness

    Retries with an idempotency key, concurrent requests for the same slot, large and unusual inputs.

  5. 05

    Automation

    API tests in code with generated data, run on every pull request, plus contract tests with consumers.

Best answers from candidates

No candidate answers yet. Type yours, and if it scores 6 or more you can show it here without your name.

Answers are shared by candidates, without names, after a privacy check. Add yours

Common mistakes

  • Only checking the status code and not the body or side effects.
  • Tests that depend on shared data and each other's order.
  • Ignoring authorisation between users.

Follow-up questions to expect

  • The endpoint must handle 500 bookings a second. How do you test that, and what do you report?
  • How do you test it when it calls a payment provider?

Now answer it out loud

Max will ask you this exact question, listen to your answer, push on the weak spots with follow-ups like the ones above, and score you when you finish.

Practice with Max

Free: a 5-minute voice round and unlimited typed drills, with scored feedback. No card, and your camera is never recorded.

More qA and test engineer interview questions