Limiting response size

The API I provide does have a rate limit, but this can be more or less circumvented by simply sending a very large request with a accordingly large response. Such requests can be blocked in principle, but I am interested in whether there is a recommendation for this in the context of JSON:API.

Are there any guidelines or recommendations regarding the maximum size of API responses? Or is this a topic that should be considered completely independently of JSON:API?

I believe this is architectural problem. Specification does not contains any limitation for size of data and even cannot dict any restriction. Limitation must be defined via API Contract and it depends on data structure and infrastructure capabilities.

2 Likes