Re: Extensions to REST-API
Ralf Schlatterbeck <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Mar 28, 2019 at 11:47:00AM +0100, Ralf Schlatterbeck wrote: > On Thu, Mar 28, 2019 at 11:13:49AM +0100, Ralf Schlatterbeck wrote: > > - The ability to look up keys of items in the database, e.g., say I want > > to find the status with the name 'closed'. Now I'd have to perform a > > search with something like: > > .../data/status?name=closed > ... > > IMO this should be extended to allow key attributes directly in the > > URL, e.g. .../data/status/closed > > Hmm, this is ambiguous if the class happens to have keys that are > numeric. In that case it's not possible to specify a key as the check > would have to determine somehow if a key or an ID was specified. > > How about specifying key- or key= or name= in the URL, e.g. > > .../data/status/name=closed I've now implemented this as well as the short-form .../data/status/closed (the latter works only if you're sure the values of the key property are never numeric). 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]