API practice guide

Documented endpoints for API and contract testing exercises.

Students can consume these endpoints with Playwright API tests, Postman, curl, contract checks, and performance tooling.

What this page is doing

It explains the available endpoints and typical assertions to teach.

Training endpoints
MethodPathPurpose
GET/healthService health check
POST/sumSimple arithmetic endpoint
POST/loginAuthentication flow
GET/api/usersSeeded users list
GET/api/productsSeeded products list
GET/api/ordersSeeded orders list
GET/api/training-summaryOverview of training surface area
GET/api/slow-report?delay=1200Simulated slow endpoint

Sample request

{
  "username": "student",
  "password": "********"
}

Good student tasks

  • Assert status codes and response bodies
  • Validate error handling and missing fields
  • Measure response times
  • Use data-driven tests against lists