Grokking the System Design Interview, Volume II
0% completed
Step 4: API Design
Making an ID costs a few processor instructions, so what a client actually pays for is the call itself. The important design work is therefore the shape of the API, which decides how often a client has to call at all. There is one endpoint.
1. Generate IDs
POST /v1/ids- Headers:
Authorization: Bearer <token> - Request Body:
{ "type": "sortable", // or "opaque" "count": 1 // up to 1000 }
- Response:
200 OK. The call creates no addressable resource, so there is nothing for a201 Createdto point at.
{ "type": "sortable",
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%