c3lf-system-3/web/API.md

60 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2019-11-30 12:43:39 +00:00
# API 0.2
2019-11-28 23:44:59 +00:00
Version major.minor
- major: braking change
- minor: compatible addition
## Notes
2019-11-28 23:58:10 +00:00
json endpoints returning a list should always be encapsulated ba an object to make non-breaking api changes easier, like this example
2019-11-28 23:44:59 +00:00
```json
{"events":[{},{},{}]}
```
##Endpoints
### Items
2019-11-30 12:43:39 +00:00
#### ``GET /api/<version.major>/<event.id>/items``
2019-11-28 23:44:59 +00:00
2019-11-30 12:43:39 +00:00
#### ``GET /api/<version.major>/<event.id>/items/<search_query>``
Returns all results of a fuzzy search over all items for <search_query>. The <search_query> should be url-encoded.
2019-11-28 23:44:59 +00:00
2019-12-17 23:41:38 +00:00
#### ``GET /api/<version.major>/<event.id>/item/<item.uid>``
2019-11-28 23:44:59 +00:00
2019-12-17 23:41:38 +00:00
#### ``DELETE /api/<version.major>/<event.id>/item/<item.uid>``
2019-11-28 23:44:59 +00:00
2019-12-17 23:41:38 +00:00
#### ``PUT /api/<version.major>/<event.id>/item/<item.uid>``
2019-11-28 23:44:59 +00:00
2019-12-20 17:57:24 +00:00
#### ``POST /api/<version.major>/<event.id>/item``
2019-11-28 23:44:59 +00:00
### Boxes
2019-11-30 17:33:18 +00:00
#### ``GET /api/<version.major>/boxes``
2019-11-28 23:44:59 +00:00
2019-12-17 23:41:38 +00:00
#### ``GET /api/<version.major>/box/<box.cid>``
2019-11-28 23:44:59 +00:00
2019-12-17 23:41:38 +00:00
#### ``DELETE /api/<version.major>/box/<box.cid>``
2019-11-28 23:44:59 +00:00
2019-12-17 23:41:38 +00:00
#### ``PUT /api/<version.major>/box/<box.cid>``
2019-11-28 23:44:59 +00:00
2019-12-17 23:41:38 +00:00
#### ``POST /api/<version.major>/box/<box.cid>``
2019-11-28 23:44:59 +00:00
### Events
```json
{
"name":"36. Chaos Communication Congress",
"slug":"36C3",
"start": 1577401200,
"end": 1577746800,
"pre_start": 1576882800,
"post_end": 1577919600
}
```
2019-11-30 12:43:39 +00:00
#### ``GET /api/<version.major>/events``
2019-11-28 23:44:59 +00:00
returns a list of all tracked events
### Files/Images
2019-12-05 19:10:43 +00:00
#### ``GET /api/<version.major>/images/<file.hash>``
#### ``GET /api/<version.major>/thumbs/<file.hash>``