liveBook · Manning

Page size

As explained in Building Web APIs with ASP.NET Core

A page size is a parameter specifying the number of records returned in each page of a paged result set.

A page size specifies how many records a paged result returns on each page. In server-side paging, the client supplies or accepts this value while the API uses it to return only the requested subset. The server can also provide a default, override the value, or restrict it to control response size and performance. section 5.4.1

Rejecting an oversized request

A request such as /BoardGames?pageSize=200 can return HTTP 400 Bad Request when the endpoint allows page sizes only from 1 through 100. Limiting the value prevents potentially expensive data-retrieval requests and helps avoid response delays and performance drops. section 6.1.2

How Building Web APIs with ASP.NET Core covers it

How deep it goes
Explains defaults, Skip/Take use, response metadata, and range validation, but does not detail pagination algorithms.
Examples
Uses a BoardGames endpoint with a default of 10, a maximum of 100, and a rejected pageSize=200 request.
What it assumes
Assumes basic HTTP endpoint and API parameter knowledge while defining PageIndex, PageSize, and RecordCount directly.
What you can do after
Configure ASP.NET Core endpoints with defaults, bounded inputs, paged queries, and response metadata.
How it connects
Connects page size with server-side paging, PageIndex, RecordCount, data validation attributes, and denial-of-service attacks.

Also explained in

Compare how 3 books explain page size →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Web APIs with ASP.NET Core. The section links point to the parts of the book it draws on.