A query string is the part of a uniform resource locator (URL) containing data that does not fit conveniently into a hierarchical path structure. The query string commonly includes fields added to a base URI by a Web browser or other client application, for example as part of an HTML form.
Following are the rules relating to the design of URI queries.
- Rule: The query component of a URI may be used to filter collections or stores
GET /users
GET /users?role=admin
- Rule: The query component of a URI should be used to paginate collection or store results
GET /users?pageSize=25&pageStartIndex=50
POST /users/search
Parameters: pageSize, pageStartIndex