Make WordPress Core

Opened 3 years ago

#52590 new enhancement

Consider increasing the limit of the perPage argument in paginated requests.

Reported by: youknowriad's profile youknowriad Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: REST API Keywords:
Focuses: rest-api Cc:


In some situations where we fetch a small number of fields, clients might want to fetch a big number of items at once. For instance in Gutenberg, while selecting parent pages or selecting authors, ideally we should be able to fetch more than 100 elements at once.

I understand that the current limits are there to avoid memory issues but clients can make informed decisions by fetching a small number of fields instead to avoid said memory issues. Most issues seems to happen when you fetch the "content" field in the posts end point.

After some discussion on slack. it was suggested that we could consider increasing that limit depending on a the requested fields.

Another option that was shared was to rely on the "embed" context.

Change History (0)

Note: See TracTickets for help on using tickets.