Add some common filters to REST API resources that expose collections

Bug #1190582 reported by Florian Fuchs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
New
Undecided
Unassigned

Bug Description

When Postorius GETs a collection of lists from the REST API, it will in most situations only use a subset (the ones that are set to "advertise in list index"). This is a minor issue as long as the request isn't paginated, but can lead to incorrect item counts when it is.

Example:

GET /<email address hidden>?page=1&count=10

will return all lists within the range [:10] from the database. If there are x unadvertised lists in the result, the page will only show 10 - x results.

I guess the most common way to solve this is for the REST API to accept a number of common filter params which are used in the WHERE clause of the database query. In this case:

GET /<email address hidden>?page=1&count=10&advertised=(0|1|2)

0 - only non-advertised
1 - only advertised
2 - both

Tags: mailman3 rest
description: updated
description: updated
Revision history for this message
Abhilash Raj (raj-abhilash1) wrote :

This bug has been moved to the new gitlab repo here: https://gitlab.com/mailman/mailman/issues/70

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.