wunderio / wunderhub

A central content repository for the WunderSites.
http://docs.wunderhub.apiary.io/
GNU General Public License v2.0
3 stars 3 forks source link

Add human friendly filters to api endpoints #33

Open lewisnyman opened 8 years ago

lewisnyman commented 8 years ago

All API endpoints filter are based on UUID or similar. It would be nice if something like /api/team/lewis returned a result. It would open the door for better public facing urls and natural language tasks with cato.

joesb commented 8 years ago

So there's some filters already on most endpoints, but they're accessed with URL query parameters, rather than path elements (contextual filters in Drupal's Views). I.e.

/api/blog?uid=126 – gets the blogs from the user with UID 126 /api/blog?country=United+Kingdom – gets blogs set as from the country 'United Kingdom'

Those ^ are there on most of the content API endpoints.

It'd be good to work out which filters we need, and which should be URL query parameters (i.e. proper filters) and which should be path elements.