-
Notifications
You must be signed in to change notification settings - Fork 6
REST API Discovery
Peter Mueller edited this page Apr 3, 2026
·
1 revision
Vespasian classifies REST endpoints from captured HTTP traffic and generates OpenAPI 3.0 specifications.
Vespasian uses the following signals to identify REST API calls and separate them from static assets:
-
Content-type: Responses with
application/jsonorapplication/xml -
Static asset exclusion: Drops
.js,.css,.png,.woff,/static/,/assets/ -
Path heuristics:
/api/,/v1/,/v2/,/v3/,/rest/,/rpc/paths boost confidence -
HTTP method:
POST/PUT/PATCH/DELETEto non-page URLs - Response structure: JSON object or array bodies (not HTML)
REST APIs are output as OpenAPI 3.0 specifications in YAML or JSON format.
Vespasian normalizes dynamic path segments into parameters:
-
/users/42and/users/87become/users/{id} - Known literals like
/meand/selfare preserved
When probing is enabled (default), Vespasian enriches REST endpoints with:
- OPTIONS discovery — Discovers allowed HTTP methods
- JSON schema inference — Infers request/response schemas from observed traffic
# One-step REST discovery
vespasian scan https://app.example.com --api-type rest -o api.yaml
# Two-stage workflow
vespasian crawl https://app.example.com -o capture.json
vespasian generate rest capture.json -o api.yamlVespasian is built by Praetorian. Learn more about the Praetorian Guard attack surface management platform. Licensed under Apache 2.0.