Grokking Modern API Design Interview
Vote

0% completed

​

Request and Response Shapes

What should this operation return?

GET /orders?status=confirmed&limit=20

The shortest answer is a JSON array:

[ { "id": "ord_7M2K", "status": "confirmed" } ]

This course returns something slightly larger:

{ "items": [ { "id": "ord_7M2K", "status": "confirmed" } ], "next_cursor": "eyJhZnRlciI6Im9yZF83TTJLIn0" }

The object form provides space for pagination and other metadata in the response body. This lesson explains why the course uses it.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content