All Questions
Api Design easy

You're designing a REST API for a blog. Which endpoint best represents 'get all comments for post 123'?

  1. A GET /comments?postId=123
  2. B GET /posts/123/comments
  3. C POST /comments/fetch { "postId": 123 }
  4. D GET /posts/123?include=comments

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions