question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New /api/{list} endpoint with field selection and filtering

See original GitHub issue

To 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’s addFilterToQuery(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 to Query.sort as a space-separated list. Inverse sort is specified by prefixing - to any path.
  • limit (number) the maximum number of items to return; default 100
  • skip (number) the number of items to skip (used for pagination); default 0
  • expandRelationshipFields (boolean) populates relationship fields with id and name properties (name retrieved with list.getDocumentName(item))

The data returned should be in the format:

{
  results: [Array of items],
  count: Number, // total results matching the filters
}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jjheskcommented, Feb 7, 2017

@JedWatson thanks!

0reactions
JedWatsoncommented, Apr 1, 2016

See #2557

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found