235 lines
5.5 KiB
Markdown
235 lines
5.5 KiB
Markdown
|
|
Elwig Backend
|
|
=============
|
|
|
|
|
|
|
|
Elwig API
|
|
=========
|
|
|
|
Authorization
|
|
-------------
|
|
|
|
All API endpoints are secured via an HTTP basic authentication.
|
|
|
|
|
|
Base Data
|
|
---------
|
|
|
|
### `GET /wine/varieties`
|
|
|
|
#### Query Parameters
|
|
|
|
* `limit`
|
|
* `offset`
|
|
|
|
#### Example
|
|
|
|
```http
|
|
GET /wine/varieties HTTP/1.1
|
|
Host: example.com
|
|
Accept: application/json
|
|
Authorization: Basic dGVzdDp0ZXN0
|
|
```
|
|
|
|
```http
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json; charset=UTF-8
|
|
Content-Length: 3384
|
|
Access-Control-Allow-Origin: *
|
|
Access-Control-Allow-Headers: Authorization
|
|
Access-Control-Allow-Methods: HEAD, GET, OPTIONS
|
|
|
|
```
|
|
|
|
|
|
### `GET /wine/quality_levels`
|
|
|
|
#### Query Parameters
|
|
|
|
* `limit`
|
|
* `offset`
|
|
|
|
#### Example
|
|
|
|
```http
|
|
GET /wine/quality_levels HTTP/1.1
|
|
Host: example.com
|
|
Accept: application/json
|
|
Authorization: Basic dGVzdDp0ZXN0
|
|
```
|
|
|
|
```http
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json; charset=UTF-8
|
|
Content-Length: 922
|
|
Access-Control-Allow-Origin: *
|
|
Access-Control-Allow-Headers: Authorization
|
|
Access-Control-Allow-Methods: HEAD, GET, OPTIONS
|
|
|
|
```
|
|
|
|
|
|
Client Base Data
|
|
----------------
|
|
|
|
### `GET /wine/attributes`
|
|
|
|
#### Query Parameters
|
|
|
|
* `limit`
|
|
* `offset`
|
|
|
|
#### Example
|
|
|
|
```http
|
|
GET /wine/attributes HTTP/1.1
|
|
Host: example.com
|
|
Accept: application/json
|
|
Authorization: Basic dGVzdDp0ZXN0
|
|
```
|
|
|
|
```http
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json; charset=UTF-8
|
|
Content-Length: 162
|
|
Access-Control-Allow-Origin: *
|
|
Access-Control-Allow-Headers: Authorization
|
|
Access-Control-Allow-Methods: HEAD, GET, OPTIONS
|
|
|
|
```
|
|
|
|
|
|
### `GET /wine/cultivations`
|
|
|
|
#### Query Parameters
|
|
|
|
* `limit`
|
|
* `offset`
|
|
|
|
#### Example
|
|
|
|
```http
|
|
GET /wine/cultivations HTTP/1.1
|
|
Host: example.com
|
|
Accept: application/json
|
|
Authorization: Basic dGVzdDp0ZXN0
|
|
```
|
|
|
|
```http
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json; charset=UTF-8
|
|
Content-Length: 205
|
|
Access-Control-Allow-Origin: *
|
|
Access-Control-Allow-Headers: Authorization
|
|
Access-Control-Allow-Methods: HEAD, GET, OPTIONS
|
|
|
|
```
|
|
|
|
|
|
### `GET /modifiers`
|
|
|
|
#### Query Parameters
|
|
|
|
* `limit`
|
|
* `offset`
|
|
* `filters`
|
|
* `year=<YEAR>[;<YEAR> ...]`
|
|
|
|
#### Example
|
|
|
|
```http
|
|
GET /modifiers?filters=year=2020 HTTP/1.1
|
|
Host: example.com
|
|
Accept: application/json
|
|
Authorization: Basic dGVzdDp0ZXN0
|
|
```
|
|
|
|
```http
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json; charset=UTF-8
|
|
Content-Length: 282
|
|
Access-Control-Allow-Origin: *
|
|
Access-Control-Allow-Headers: Authorization
|
|
Access-Control-Allow-Methods: HEAD, GET, OPTIONS
|
|
|
|
```
|
|
|
|
|
|
Delivery Schedules
|
|
------------------
|
|
|
|
### `GET /delivery_schedules`
|
|
|
|
#### Query Parameters
|
|
|
|
* `limit`
|
|
* `offset`
|
|
* `filters`
|
|
* `year=<YEAR>[;<YEAR> ...]`
|
|
* `sortid=<SORTID>[;<SORTID> ...]`
|
|
* `date=<DATE>[;<DATE> ...]`
|
|
|
|
#### Example
|
|
|
|
```http
|
|
GET /delivery_schedules?filters=year=2020,sortid=GV;ZW HTTP/1.1
|
|
Host: example.com
|
|
Accept: application/json
|
|
Authorization: Basic dGVzdDp0ZXN0
|
|
```
|
|
|
|
```http
|
|
HTTP/1.1 200 OK
|
|
Content-Type: application/json; charset=UTF-8
|
|
Content-Length: 10000
|
|
Access-Control-Allow-Origin: *
|
|
Access-Control-Allow-Headers: Authorization
|
|
Access-Control-Allow-Methods: HEAD, GET, OPTIONS
|
|
|
|
```
|