Work in progress #6: Define header sets
[tolino-api-docs.git] / api / headers.rst
1 =======
2 Headers
3 =======
4
5 ``User-Agent``
6   Normal API requests:
7
8   ``Dalvik/1.6.0 (Linux; U; Android 4.4.2; tolino Build/KOT49H)``
9
10   The browser:
11
12   ``Mozilla/5.0 (Linux; Android 4.4.2; en-; tolino vision 3 HD/14.1.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Mobile Safari/537.36 READER OS_BUILD/KOT49H.41429.1044823``
13
14
15 bosh v1 header set
16 ==================
17 Headers common in all HTTP requests to ``https://bosh.pageplace.de/bosh/rest/...``
18 (except ``../rest/v2/``).
19
20 ``t_auth_token``
21   OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_.
22
23   Example: ``eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...``
24 ``Accept``
25   Example: ``application/json; charset=UTF-8``
26 ``m_id``
27   Probably the reseller ID
28
29   Example: ``3``
30 ``hardware_id``
31   FIXME: Serial number of the ebook reader?
32
33   Example: ``665fc389ef4e47258c5db9fa7821bd19``
34 ``Content-Type``
35   ``application/json; charset=UTF-8``
36
37   Always set even if there is no request body.
38 ``client_type``
39   Example: ``TOLINO_VISION_3``
40 ``client_version``
41   Example: ``14.1.0``
42
43
44 family v1 header set
45 ====================
46 ``Authorization``
47   OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_.
48
49   Example: ``Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...``
50 ``Accept``
51   Example: ``application/json; charset=UTF-8``
52 ``Accept-Encoding``
53   ``gzip``
54 ``m_id``
55   Probably reseller ID.
56
57   Example: ``3``
58 ``Hardware-Id``
59   Example: ``665fc389ef4e47258c5db9fa7821bd19``
60 ``Content-Type``
61   ``application/json; charset=UTF-8``
62
63   This is a lie; there is no request body.
64 ``client_type``
65   Example: ``TOLINO_VISION_3``
66 ``client_version``
67   Example: ``14.1.0``
68 ``Reseller-Id``
69   Example: ``3``
70 ``Cookie``
71   Multiple times:
72
73   -  ``OAUTH-JSESSIONID=3EFAEC6B69D811252C75861880C338AB.15acdb90; Path=/; Secure; HttpOnly``
74   - ``JSESSIONID=C0D8A077F6D2E13251ECDCD60FE6D18A``
75 ``Cookie2``
76   Example: ``$Version=1``