Grokking Modern API Design Interview
0% completed
URL Design
A caller has already seen two URLs:
GET /projects/prj_81M GET /tasks/tsk_42Q
You now ask that caller to list the open tasks in one project. Can they write the URL without opening the documentation?
With consistent naming rules, the URL is easier to predict:
GET /projects/prj_81M/tasks?status=open&limit=20
Consistent URL rules help clients identify resources, understand parent-child relationships, and apply filters. The goal is to make related operations easier to predict.
1. The Predictability Test
Consider this surface:
GET /getProject?id=prj_81M
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%