New /api/{list} endpoint with field selection and filtering
See original GitHub issueTo support the new Admin UI, we need a new generic List API Endpoint:
GET /keystone/api/{list.path}
It should implement the following query parameters:
-
search
(string)
search query applied to the List’s default search fields -
filters
(JSON Object)
used to filter the query; all top-level keys in this object that match field paths would be passed to each field’saddFilterToQuery(filter, query)
method, see #1539 -
select
(space-delimited string of paths)
used to select fields to be returned; defaults to all fields defined in the list. -
populate
(space-delimited string of paths)
relationship fields to populate -
sort
(space-delimited string of paths)
sorts the query; paths are passed toQuery.sort
as a space-separated list. Inverse sort is specified by prefixing-
to any path. -
limit
(number)
the maximum number of items to return; default100
-
skip
(number)
the number of items to skip (used for pagination); default0
-
expandRelationshipFields
(boolean)
populates relationship fields withid
andname
properties (name retrieved withlist.getDocumentName(item)
)
The data returned should be in the format:
{
results: [Array of items],
count: Number, // total results matching the filters
}
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Working with lists and list items with REST | Microsoft Learn
Property Description Type
GroupString Group identifier used for drill‑down feature. string
Field Specifies a special field that should be included. string
FilterData Data specified by a...
Read more >REST API Design: Filtering, Sorting, and Pagination - Moesif
Advanced REST API design guidelines for API filtering, sorting, and pagination. ... The URL parameter key contains both the field name and operator....
Read more >REST API Filtering - Nautobot Documentation
The objects returned by an API list endpoint can be filtered by attaching one or more query parameters to the request URL.
Read more >Selecting, Filtering and Sorting Results in a SharePoint List
The above REST API request returns all items with all possible fields from a SharePoint list called "Employees", located in the SharePoint site....
Read more >Rest API - $filter multiple values - SharePoint Stack Exchange
You have to use and or or inside the filter . So try using something like that: /_api/web/lists/getbytitle('Students')/items?$select ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JedWatson thanks!
See #2557