update API documentation
[mygpo.git] / api-docs / reference / events.rst
blob2d168c1149105e5c777b916913e9627b99e284d2
1 .. _events-api:
3 Events API
4 ==========
7 Resources
8 ---------
10 The Events API defines the following resources ::
12     /user/<username>/events
13     /user/<username>/events/<id>
16 Upload Events
17 -------------
19 Request ::
21     POST /user/<username>/events
22     Content-Tpe: application/json
25 Responses:
27 Processed immediatelly ::
29     204 No Content
32 Accepted for later processing ::
34     202 Accepted
38 Download Events
39 ---------------
41 Parameters
43 * since (optional, default 0)
46 Request ::
48     GET /user/<username>/events
51 Responses.
53 Response ::
55     200 OK
56     Content-Tpe: application/json
57     TODO ...?
60 Response is being prepared ::
62     203 Found / 202 See Other
63     Link: /user/<username>/events/<id>
66 The server is preparing the result at the specified resource. The client should
67 try to fetch the data from the given URLs. ::
69     GET /user/<username>/events/<id>
70     Content-Tpe: application/json
73 A 404 might be returned before the data is ready. The client may retry after
74 xxx seconds. ::
76     404 Not Found
79 When the data is ready, 200 will be returned ::
81     200 OK
82     Content-Tpe: application/json
84     TODO: body...
87 When the data is no longer available, a 410 is returned. ::
89     410 Gone