[PATCHv2 00/10] REST API support

Andy Doan andy.doan at linaro.org
Wed May 11 08:39:17 AEST 2016

This patchset is inspired by the work done by Damien Lespiau. It creates
a REST API based on the original spec RFC'd by Stephen Finucane. The
only thing I know of that's missing from the patch set are bundles. I
think over time the Series support will make them less important, but we
could always tack bundles on to this if needed.

This set is missing a corresponding CLI client. I think it might deserve
its own series. However, I've been testing a new client to make sure the
API is complete enough to be useful:


Changes since RFC:
  * consistency with appending to arrays in settings
  * better requirements.txt spec
  * enable by default in dev.py
  * url management in urls.py
  * break out serializers into their own file
  * get rid of "create_model_serializer"
  * fix per_page query parameter
  * use "reverse" for api urls in tests
  * checks to use string rather than int
  * remove patch-mbox endpoint and embed "raw_url"
  * patch state now a string (and removal of State endpoint)

Andy Doan (9):
  REST: Add base configuration hooks for a REST API
  REST: Add Projects to the API
  REST: Add Persons to the API
  REST: Add Patches to the API
  REST: Add Patch Checks to the API
  REST: Add Patch.mbox_url
  REST API: make patch.state a string rather than int
  REST: Add query parameters to filter patches by
  REST: Allow projects to be retrieved by linkname

Stephen Finucane (1):
  docs: Add prototype API specification

 docs/api.yaml                    | 392 +++++++++++++++++++++++++++++++++++++++
 patchwork/models.py              |   8 +-
 patchwork/rest_serializers.py    |  91 +++++++++
 patchwork/settings/base.py       |  11 ++
 patchwork/settings/dev.py        |   1 +
 patchwork/tests/test_rest_api.py | 374 +++++++++++++++++++++++++++++++++++++
 patchwork/urls.py                |  10 +
 patchwork/views/rest_api.py      | 176 ++++++++++++++++++
 requirements-test.txt            |   3 +
 9 files changed, 1064 insertions(+), 2 deletions(-)
 create mode 100644 docs/api.yaml
 create mode 100644 patchwork/rest_serializers.py
 create mode 100644 patchwork/tests/test_rest_api.py
 create mode 100644 patchwork/views/rest_api.py


More information about the Patchwork mailing list