-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversioning.http
More file actions
27 lines (21 loc) · 796 Bytes
/
versioning.http
File metadata and controls
27 lines (21 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
### ============================
### API Versioning
### ============================
### V1 (URI-based) — flat response with IDs
GET http://localhost:8080/api/v1/sessions
Accept: application/json
### V2 (URI-based) — enriched response with embedded speaker/room
GET http://localhost:8080/api/v2/sessions
Accept: application/json
### Header-based versioning — route to V2 via X-API-Version header
### (requests to /api/sessions without a version prefix)
GET http://localhost:8080/api/sessions
Accept: application/json
X-API-Version: 2
### Header-based versioning — route to V1 explicitly
GET http://localhost:8080/api/sessions
Accept: application/json
X-API-Version: 1
### Accept header parameter versioning
GET http://localhost:8080/api/sessions
Accept: application/json; version=2