Grokking Modern API Design Interview
Vote
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?
Against a predictable contract, they can:
GET /projects/prj_81M/tasks?status=open&limit=20
URL design is not about how paths look. It is about giving identity, containment, and modifiers one stable grammar, so that a caller who has learned two URLs can predict the third.
1. The Predictability Test
Consider this surface:
GET /getProject?id=prj_81M
.....
.....
.....
Like the course? Get enrolled and start learning!