From: Christian Weiske Date: Sun, 7 Mar 2021 20:29:18 +0000 (+0100) Subject: Work in progress #6: Define header sets X-Git-Url: https://git.cweiske.de/tolino-api-docs.git/commitdiff_plain/b063c08abecafdfbeb3a1a566f2c3f7c46fe439a Work in progress #6: Define header sets --- diff --git a/api/headers.rst b/api/headers.rst index e5306cb..80ab15c 100644 --- a/api/headers.rst +++ b/api/headers.rst @@ -10,3 +10,67 @@ Headers The browser: ``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`` + + +bosh v1 header set +================== +Headers common in all HTTP requests to ``https://bosh.pageplace.de/bosh/rest/...`` +(except ``../rest/v2/``). + +``t_auth_token`` + OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_. + + Example: ``eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...`` +``Accept`` + Example: ``application/json; charset=UTF-8`` +``m_id`` + Probably the reseller ID + + Example: ``3`` +``hardware_id`` + FIXME: Serial number of the ebook reader? + + Example: ``665fc389ef4e47258c5db9fa7821bd19`` +``Content-Type`` + ``application/json; charset=UTF-8`` + + Always set even if there is no request body. +``client_type`` + Example: ``TOLINO_VISION_3`` +``client_version`` + Example: ``14.1.0`` + + +family v1 header set +==================== +``Authorization`` + OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_. + + Example: ``Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...`` +``Accept`` + Example: ``application/json; charset=UTF-8`` +``Accept-Encoding`` + ``gzip`` +``m_id`` + Probably reseller ID. + + Example: ``3`` +``Hardware-Id`` + Example: ``665fc389ef4e47258c5db9fa7821bd19`` +``Content-Type`` + ``application/json; charset=UTF-8`` + + This is a lie; there is no request body. +``client_type`` + Example: ``TOLINO_VISION_3`` +``client_version`` + Example: ``14.1.0`` +``Reseller-Id`` + Example: ``3`` +``Cookie`` + Multiple times: + + - ``OAUTH-JSESSIONID=3EFAEC6B69D811252C75861880C338AB.15acdb90; Path=/; Secure; HttpOnly`` + - ``JSESSIONID=C0D8A077F6D2E13251ECDCD60FE6D18A`` +``Cookie2`` + Example: ``$Version=1`` diff --git a/api/pageplace.bosh-bosh-rest-dictionary-list.rst b/api/pageplace.bosh-bosh-rest-dictionary-list.rst index c791158..db4f41b 100644 --- a/api/pageplace.bosh-bosh-rest-dictionary-list.rst +++ b/api/pageplace.bosh-bosh-rest-dictionary-list.rst @@ -9,29 +9,8 @@ Part of the `sync process`_. Request ======= -Header - ``t_auth_token`` - OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_. - - Example: ``eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...`` - ``Accept`` - Example: ``application/json; charset=UTF-8`` - ``m_id`` - FIXME: Maybe reseller ID? - - Example: ``3`` - ``hardware_id`` - Seems to be the same as the ``xxx`` value in the URL. - - Example: ``665fc389ef4e47258c5db9fa7821bd19`` - ``Content-Type`` - ``application/json; charset=UTF-8`` - - This is a lie; there is no request body. - ``client_type`` - Example: ``TOLINO_VISION_3`` - ``client_version`` - Example: ``14.1.0`` +Headers + See `bosh v1 header set`_ No request body. diff --git a/api/pageplace.bosh-bosh-rest-handshake-resellers.rst b/api/pageplace.bosh-bosh-rest-handshake-resellers.rst index 3bb8da5..a1c2f15 100644 --- a/api/pageplace.bosh-bosh-rest-handshake-resellers.rst +++ b/api/pageplace.bosh-bosh-rest-handshake-resellers.rst @@ -14,28 +14,7 @@ Part of the `sync process`_. Request ======= Header - ``t_auth_token`` - OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_. - - Example: ``eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...`` - ``Accept`` - Example: ``application/json; charset=UTF-8`` - ``m_id`` - FIXME: Maybe reseller ID? - - Example: ``3`` - ``hardware_id`` - Seems to be the same as the ``xxx`` value in the URL. - - Example: ``665fc389ef4e47258c5db9fa7821bd19`` - ``Content-Type`` - ``application/json; charset=UTF-8`` - - This is a lie; there is no request body. - ``client_type`` - Example: ``TOLINO_VISION_3`` - ``client_version`` - Example: ``14.1.0`` + See `bosh v1 header set`_ Response diff --git a/api/pageplace.bosh-bosh-rest-inventory-count.rst b/api/pageplace.bosh-bosh-rest-inventory-count.rst index 1a6c184..d987ca8 100644 --- a/api/pageplace.bosh-bosh-rest-inventory-count.rst +++ b/api/pageplace.bosh-bosh-rest-inventory-count.rst @@ -10,28 +10,7 @@ Request ======= Header - ``t_auth_token`` - OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_. - - Example: ``eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...`` - ``Accept`` - Example: ``application/json; charset=UTF-8`` - ``m_id`` - FIXME: Maybe reseller ID? - - Example: ``3`` - ``hardware_id`` - Seems to be the same as the ``xxx`` value in the URL. - - Example: ``665fc389ef4e47258c5db9fa7821bd19`` - ``Content-Type`` - ``application/json; charset=UTF-8`` - - This is a lie; there is no request body. - ``client_type`` - Example: ``TOLINO_VISION_3`` - ``client_version`` - Example: ``14.1.0`` + See `bosh v1 header set`_ Response diff --git a/api/pageplace.bosh-bosh-rest-ping.rst b/api/pageplace.bosh-bosh-rest-ping.rst index 187a71f..acfedf0 100644 --- a/api/pageplace.bosh-bosh-rest-ping.rst +++ b/api/pageplace.bosh-bosh-rest-ping.rst @@ -10,6 +10,16 @@ GET Parameters ``responseStatus=204`` Always there +Headers + ``User-Agent`` + ``Dalvik/1.6.0 (Linux; U; Android 4.4.2; tolino Build/KOT49H)`` + ``Host`` + ``bosh.pageplace.de`` + ``Connection`` + ``Keep-Alive`` + ``Accept-Encoding`` + ``gzip`` + Response ======== diff --git a/api/pageplace.bosh-bosh-rest-recommendation-xyz.rst b/api/pageplace.bosh-bosh-rest-recommendation-xyz.rst index 088d583..8a7d009 100644 --- a/api/pageplace.bosh-bosh-rest-recommendation-xyz.rst +++ b/api/pageplace.bosh-bosh-rest-recommendation-xyz.rst @@ -12,28 +12,7 @@ Part of the `sync process`_. Request ======= Header - ``t_auth_token`` - OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_. - - Example: ``eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...`` - ``Accept`` - Example: ``application/json; charset=UTF-8`` - ``m_id`` - FIXME: Maybe reseller ID? - - Example: ``3`` - ``hardware_id`` - Seems to be the same as the ``xxx`` value in the URL. - - Example: ``665fc389ef4e47258c5db9fa7821bd19`` - ``Content-Type`` - ``application/json; charset=UTF-8`` - - This is a lie; there is no request body. - ``client_type`` - Example: ``TOLINO_VISION_3`` - ``client_version`` - Example: ``14.1.0`` + See `bosh v1 header set`_ GET parameters ``count`` Number of recommendations to return diff --git a/api/pageplace.bosh-bosh-rest-sync-data.rst b/api/pageplace.bosh-bosh-rest-sync-data.rst index 64097f1..b3aec6e 100644 --- a/api/pageplace.bosh-bosh-rest-sync-data.rst +++ b/api/pageplace.bosh-bosh-rest-sync-data.rst @@ -9,6 +9,9 @@ Part of the `Sync process`_. Request ======= Header + Similar to `bosh v1 header set`_, but not exactly the same. + Uses ``reseller_id`` instead of ``m_id`` and does not send the ``client_version``. + ``t_auth_token`` OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_. diff --git a/api/pageplace.bosh-bosh-rest-upload.rst b/api/pageplace.bosh-bosh-rest-upload.rst index 0fe1155..31c67a0 100644 --- a/api/pageplace.bosh-bosh-rest-upload.rst +++ b/api/pageplace.bosh-bosh-rest-upload.rst @@ -9,10 +9,15 @@ Step 1 of the `upload process`_. Request ======= Header - FIXME: Headers + Nearly identical to the `bosh v1 header set`_, but not exactly the same. + No ``client_type``, no ``client_version``. ``Content-Type`` ``multipart/form-data; boundary="Boundary1612163626238"`` + ``Content-Transfer-Encoding`` + ``binary`` + ``Content-Length`` + Depending on the request body. Request body Control data diff --git a/api/pageplace.bosh-bosh-rest-userid-xxx.rst b/api/pageplace.bosh-bosh-rest-userid-xxx.rst index 2aaae29..4bf9e48 100644 --- a/api/pageplace.bosh-bosh-rest-userid-xxx.rst +++ b/api/pageplace.bosh-bosh-rest-userid-xxx.rst @@ -16,26 +16,7 @@ Request No body in the request, despite the ``Content-Type`` header. Header - ``t_auth_token`` - OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_. - - Example: ``eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...`` - ``Accept`` - ``application/json; charset=UTF-8`` - ``m_id`` - FIXME: Maybe reseller ID? - - Example: ``3`` - ``hardware_id`` - Seems to be the same as the ``xxx`` value in the URL. - - Example: ``665fc389ef4e47258c5db9fa7821bd19`` - ``Content-Type`` - ``application/json; charset=UTF-8`` - ``client_type`` - Example: ``TOLINO_VISION_3`` - ``client_version`` - Example: ``14.1.0`` + See `bosh v1 header set`_. Response diff --git a/api/pageplace.family-v1-family.rst b/api/pageplace.family-v1-family.rst index aacb47b..d1e4ce9 100644 --- a/api/pageplace.family-v1-family.rst +++ b/api/pageplace.family-v1-family.rst @@ -13,37 +13,7 @@ This is only called when the user has family member data Request ======= Header - ``Authorization`` - OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_. - - Example: ``Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...`` - ``Accept`` - Example: ``application/json; charset=UTF-8`` - ``Accept-Encoding`` - ``gzip`` - ``m_id`` - FIXME: Maybe reseller ID? - - Example: ``3`` - ``Hardware-Id`` - Example: ``665fc389ef4e47258c5db9fa7821bd19`` - ``Content-Type`` - ``application/json; charset=UTF-8`` - - This is a lie; there is no request body. - ``client_type`` - Example: ``TOLINO_VISION_3`` - ``client_version`` - Example: ``14.1.0`` - ``Reseller-Id`` - Example: ``3`` - ``Cookie`` - Multiple times: - - - ``OAUTH-JSESSIONID=3EFAEC6B69D811252C75861880C338AB.15acdb90; Path=/; Secure; HttpOnly`` - - ``JSESSIONID=C0D8A077F6D2E13251ECDCD60FE6D18A`` - ``Cookie2`` - Example: ``$Version=1`` + See `family v1 header set`_. No request body. diff --git a/api/pageplace.family-v1-myself.rst b/api/pageplace.family-v1-myself.rst index 6bc5926..85e6bfc 100644 --- a/api/pageplace.family-v1-myself.rst +++ b/api/pageplace.family-v1-myself.rst @@ -10,37 +10,7 @@ Part of the `sync process`_. Request ======= Header - ``Authorization`` - OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_. - - Example: ``Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...`` - ``Accept`` - Example: ``application/json; charset=UTF-8`` - ``Accept-Encoding`` - ``gzip`` - ``m_id`` - FIXME: Maybe reseller ID? - - Example: ``3`` - ``Hardware-Id`` - Example: ``665fc389ef4e47258c5db9fa7821bd19`` - ``Content-Type`` - ``application/json; charset=UTF-8`` - - This is a lie; there is no request body. - ``client_type`` - Example: ``TOLINO_VISION_3`` - ``client_version`` - Example: ``14.1.0`` - ``Reseller-Id`` - Example: ``3`` - ``Cookie`` - Multiple times: - - - ``OAUTH-JSESSIONID=3EFAEC6B69D811252C75861880C338AB.15acdb90; Path=/; Secure; HttpOnly`` - - ``JSESSIONID=C0D8A077F6D2E13251ECDCD60FE6D18A`` - ``Cookie2`` - Example: ``$Version=1`` + See `family v1 header set`_. No request body. diff --git a/api/pageplace.family-v1-shares.rst b/api/pageplace.family-v1-shares.rst index 0338b21..b02992a 100644 --- a/api/pageplace.family-v1-shares.rst +++ b/api/pageplace.family-v1-shares.rst @@ -15,37 +15,7 @@ This is only called when the user has family member data Request ======= Header - ``Authorization`` - OAuth token obtained from `POST https://thalia.de/auth/oauth2/token`_. - - Example: ``Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWRpZW5jZSI6InRyZWFkZXJ2aXNpb24zIiw...`` - ``Accept`` - Example: ``application/json; charset=UTF-8`` - ``Accept-Encoding`` - ``gzip`` - ``m_id`` - FIXME: Maybe reseller ID? - - Example: ``3`` - ``Hardware-Id`` - Example: ``665fc389ef4e47258c5db9fa7821bd19`` - ``Content-Type`` - ``application/json; charset=UTF-8`` - - This is a lie; there is no request body. - ``client_type`` - Example: ``TOLINO_VISION_3`` - ``client_version`` - Example: ``14.1.0`` - ``Reseller-Id`` - Example: ``3`` - ``Cookie`` - Multiple times: - - - ``OAUTH-JSESSIONID=3EFAEC6B69D811252C75861880C338AB.15acdb90; Path=/; Secure; HttpOnly`` - - ``JSESSIONID=C0D8A077F6D2E13251ECDCD60FE6D18A`` - ``Cookie2`` - Example: ``$Version=1`` + See `family v1 header set`_. No request body.