Hello efkin, thanks for your work on this but this is the kind of feature where we want to push some thoughts in the initial design. So I'll try to do that now.
On Mon, 12 Dec 2016, efkin wrote: > The API endpoint atm just returns a list of dicts with `type_name` and > `extra_data`. It should certainly return all other fields from the ActionItem: - type_description => info for the user - package => in case we query action items by something else than package - short_description => info for the user - severity => info for the user - created_timestamp => info for the user - last_updated_timestamp => info for the user - id => in case we later want to support PUT/PATCH/DELETE operations to edit the action item (for example assigning it to someone), we will want need this unique identifier > $ curl http://tracker.dev:8000/api/ibniz/actions The URL also needs a bit of thought: - first I would suggest to use a versioned namespace so that we can create an enhanced version of the API without breaking backwards compatibility so /api/v1/ at the start - then I would not put the package name here in the URL, it will conflict with other non-package based API calls and we might want to retrieve action items by maintainer email and not by package too... so I would turn the package name into a GET query parameter. /api/v1/action-items?package=ibniz That let us support other queries like ?maintainer=foo@bar in the future. Also the API might be easier to develop/extend with some dedicated Django helper applications. Did you look into the existing applications like http://www.django-rest-framework.org/ ? Cheers, -- Raphaël Hertzog ◈ Debian Developer Support Debian LTS: http://www.freexian.com/services/debian-lts.html Learn to master Debian: http://debian-handbook.info/get/