12 / 139 · 13 Browser Automation with Playwright · Pre-Requisites: Discover the Application and Produce Customization Artifacts← prev⊞ allnext →☰ Read as one page
1.12Step 6 — Discover the API surface
The harness should support API automation from day one, ideally using Playwright APIRequestContext.
Learn the API structure
If you have API docs, Postman collections, or OpenAPI, capture:
- endpoint groups
- auth endpoints
- main resources
- create/read/update/delete patterns
- request/response formats
- special headers
- environment differences
- known rate limits
- unstable endpoints or async workflows
Group endpoints into client domains
Avoid dumping raw endpoint lists without structure.
Good grouping examples:
- Auth
- Users
- Orders
- Catalog
- Billing
- Reporting
- Admin
Copy-paste prompt for Claude Code
Discover the API structure for the application.
Capture:
- endpoint groups
- auth model
- key resources
- common request patterns
- important response contracts
- risks and special behaviors
Organize the output by domain and write it into:
- docs/specs/api-endpoints.md
Assume the future harness will use Playwright APIRequestContext unless there is a strong reason not to.