This thought crossed my mind when considering how to support pagination for GET /exchanges and quickly realizing that it gets unwieldy quite fast. Without pagination we run the risk of returning massive response payloads. When attempting to include pagination, we can end up in situations where we may end up returning a portion of an exchange.
I think a better design might be to update GET /exchanges to return a list of exchange IDs instead of entire exchanges. GET /exchanges/:id can then be used to retrieve all of the messages for a given exchange
This thought crossed my mind when considering how to support pagination for
GET /exchanges
and quickly realizing that it gets unwieldy quite fast. Without pagination we run the risk of returning massive response payloads. When attempting to include pagination, we can end up in situations where we may end up returning a portion of an exchange.I think a better design might be to update
GET /exchanges
to return a list of exchange IDs instead of entire exchanges.GET /exchanges/:id
can then be used to retrieve all of the messages for a given exchange