filter parameter
A query parameter that narrows a collection to members matching an exact value, such as ?state=open.
In more detail
A filter does not change what the collection is, so a request that matches nothing is still a 200 page with an empty items list. Document the allowed fields and values, reject unknown ones with a clear problem, and keep every filter in the next link.
Example
GET /tasks?state=open&owner=aliceRelated terms
- text search — Finding items whose text matches a query, such as titles containing design, rather than fields equal to an exact value.
- query string — The part of a web address after the question mark, made of name=value pairs, such as ?state=open&limit=2.
- input validation — Checking that data from a user, file or caller is acceptable before using it, and rejecting or asking again if not.
- next link — The link a paginated response gives to the following page, which the client should follow exactly as supplied.
Taught in
- Filtering And Searching — Modern API Architecture: REST, GraphQL & gRPC