REST API: Sorting, wish-list
Ralf Schlatterbeck <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
Sorting ------- I noticed that we don't have sorting in the API. Similar to the @sort/@group syntax in the index urls I'd suggest a @sort property that gets a list of properties (similar to @fields) but with an optional prepended '-' to the property indicating reverse-sorting by that property? Example: @sort=creator,-creation would give us a list of issues sorted by creator and creation date, earlier dates last (reverse-sorted by creation date). Security -------- I also noticed that the security checks for attributes seem to (always?) check the whole class, not individual properties. I think I can come up with a patch to fix this. Limit ----- Then I'd like to have a '@limit=number' (similar to SQL limit) clause that can limit the number of results returned (don't we already have something like this?). The idea is to return the biggest or smallest item (think dates) of something. So @sort + @limit=1 would get me this. Note that it would be a lot faster if this is handed down to SQL. Substring search ---------------- Currently strings do a substring-search. For an exact match we would have to extend the 'filter' method of the database. This is (at least for me) probably quite easy to do. How would we change the syntax of the REST queries? I'd suggest we change the semantics to do an exact match for property=string searches, that leave us with the question how substring search should be expressed. Ralf -- Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 Open Source Consulting www: http://www.runtux.com Reichergasse 131, A-3411 Weidling email: [email protected]