expand details in API.md

This commit is contained in:
j3d1 2019-11-30 13:43:39 +01:00
parent 69cc17f6df
commit 13e04e5d7f

28
API.md
View file

@ -1,4 +1,4 @@
# API 0.1 # API 0.2
Version major.minor Version major.minor
- major: braking change - major: braking change
- minor: compatible addition - minor: compatible addition
@ -12,30 +12,30 @@ json endpoints returning a list should always be encapsulated ba an object to ma
##Endpoints ##Endpoints
### Items ### Items
#### ``GET /api/<version>/<event.id>/items`` #### ``GET /api/<version.major>/<event.id>/items``
#### ``GET /api/<version>/<event.id>/items/<search_query>`` #### ``GET /api/<version.major>/<event.id>/items/<search_query>``
the <search_query> should be url-encoded Returns all results of a fuzzy search over all items for <search_query>. The <search_query> should be url-encoded.
#### ``GET /api/<version>/<event.id>/item/<item.id>`` #### ``GET /api/<version.major>/<event.id>/item/<item.id>``
#### ``DELETE /api/<version>/<event.id>/item/<item.id>`` #### ``DELETE /api/<version.major>/<event.id>/item/<item.id>``
#### ``PUT /api/<version>/<event.id>/item/<item.id>`` #### ``PUT /api/<version.major>/<event.id>/item/<item.id>``
#### ``POST /api/<version>/<event.id>/item/<item.id>`` #### ``POST /api/<version.major>/<event.id>/item/<item.id>``
### Boxes ### Boxes
#### ``GET /api/<version>/<event.id>/boxes`` #### ``GET /api/<version.major>/<event.id>/boxes``
#### ``GET /api/<version>/<event.id>/box/<box.id>`` #### ``GET /api/<version.major>/<event.id>/box/<box.id>``
#### ``DELETE /api/<version>/<event.id>/box/<box.id>`` #### ``DELETE /api/<version.major>/<event.id>/box/<box.id>``
#### ``PUT /api/<version>/<event.id>/box/<box.id>`` #### ``PUT /api/<version.major>/<event.id>/box/<box.id>``
#### ``POST /api/<version>/<event.id>/box/<box.id>`` #### ``POST /api/<version.major>/<event.id>/box/<box.id>``
### Events ### Events
```json ```json
@ -49,7 +49,7 @@ the <search_query> should be url-encoded
} }
``` ```
#### ``GET /api/<version>/events`` #### ``GET /api/<version.major>/events``
returns a list of all tracked events returns a list of all tracked events