detailed information on type and response format of the various resources
exposed by the API, refer to the web browsable API. This can be found at:
- https://patchwork.example.com/api/1.0/
+ https://patchwork.example.com/api/1.1/
where `patchwork.example.com` refers to the URL of your Patchwork instance.
.. code-block:: shell
- $ curl -s 'https://patchwork.example.com/api/1.0/' | python -m json.tool
+ $ curl -s 'https://patchwork.example.com/api/1.1/' | python -m json.tool
{
- "bundles": "https://patchwork.example.com/api/1.0/bundles/",
- "covers": "https://patchwork.example.com/api/1.0/covers/",
- "events": "https://patchwork.example.com/api/1.0/events/",
- "patches": "https://patchwork.example.com/api/1.0/patches/",
- "people": "https://patchwork.example.com/api/1.0/people/",
- "projects": "https://patchwork.example.com/api/1.0/projects/",
- "series": "https://patchwork.example.com/api/1.0/series/",
- "users": "https://patchwork.example.com/api/1.0/users/"
+ "bundles": "https://patchwork.example.com/api/1.1/bundles/",
+ "covers": "https://patchwork.example.com/api/1.1/covers/",
+ "events": "https://patchwork.example.com/api/1.1/events/",
+ "patches": "https://patchwork.example.com/api/1.1/patches/",
+ "people": "https://patchwork.example.com/api/1.1/people/",
+ "projects": "https://patchwork.example.com/api/1.1/projects/",
+ "series": "https://patchwork.example.com/api/1.1/series/",
+ "users": "https://patchwork.example.com/api/1.1/users/"
}
$ python
>>> import json
>>> import requests
- >>> r = requests.get('https://patchwork.example.com/api/1.0/')
+ >>> r = requests.get('https://patchwork.example.com/api/1.1/')
>>> print(json.dumps(r.json(), indent=2))
{
- "bundles": "https://patchwork.example.com/api/1.0/bundles/",
- "covers": "https://patchwork.example.com/api/1.0/covers/",
- "events": "https://patchwork.example.com/api/1.0/events/",
- "patches": "https://patchwork.example.com/api/1.0/patches/",
- "people": "https://patchwork.example.com/api/1.0/people/",
- "projects": "https://patchwork.example.com/api/1.0/projects/",
- "series": "https://patchwork.example.com/api/1.0/series/",
- "users": "https://patchwork.example.com/api/1.0/users/"
+ "bundles": "https://patchwork.example.com/api/1.1/bundles/",
+ "covers": "https://patchwork.example.com/api/1.1/covers/",
+ "events": "https://patchwork.example.com/api/1.1/events/",
+ "patches": "https://patchwork.example.com/api/1.1/patches/",
+ "people": "https://patchwork.example.com/api/1.1/people/",
+ "projects": "https://patchwork.example.com/api/1.1/projects/",
+ "series": "https://patchwork.example.com/api/1.1/series/",
+ "users": "https://patchwork.example.com/api/1.1/users/"
}
Tools like `curl` and libraries like `requests` can be used to build anything
----------
By default, all requests will receive the latest version of the API: currently
-``1.0``:
+``1.1``:
.. code-block:: http
.. code-block:: http
- GET /api/1.0 HTTP/1.1
+ GET /api/1.1 HTTP/1.1
Schema
------