summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-11-13 10:40:18 +0100
committerChristian Grothoff <christian@grothoff.org>2022-11-13 10:40:18 +0100
commit44f5e5c57e3f28b6034dd59151bcf4cea47642b4 (patch)
treea9942fd556e6abe22669a668adfba19a8b27da1b
parent2650fea7045c41b335e222a8e3af19cb714fa0ab (diff)
downloaddocs-44f5e5c57e3f28b6034dd59151bcf4cea47642b4.tar.gz
docs-44f5e5c57e3f28b6034dd59151bcf4cea47642b4.tar.bz2
docs-44f5e5c57e3f28b6034dd59151bcf4cea47642b4.zip
return Acceptable-Languages in /terms and /pp
-rw-r--r--core/api-exchange.rst45
-rw-r--r--core/api-mailbox.rst47
-rw-r--r--core/api-merchant.rst3
-rw-r--r--core/api-sync.rst19
-rw-r--r--core/api-taldir.rst42
-rw-r--r--core/tos.rst42
6 files changed, 62 insertions, 136 deletions
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
index 92e76a54..c5a67832 100644
--- a/core/api-exchange.rst
+++ b/core/api-exchange.rst
@@ -24,50 +24,9 @@ for all details not specified in the individual requests.
The `glossary <https://docs.taler.net/glossary.html#glossary>`_
defines all specific terms used in this section.
-.. _keys:
-
---------------------
-Terms of service API
---------------------
-
-These APIs allow merchants and wallets to obtain the terms of service
-and the privacy policy of an exchange.
-
-
-.. http:get:: /terms
-
- Get the terms of service of the exchange.
- The exchange will consider the "Accept" and "Accept-Language" and
- "Accept-Encoding" headers when generating a response. Specifically,
- it will try to find a response with an acceptable mime-type, then
- pick the version in the most preferred language of the user, and
- finally apply compression if that is allowed by the client and
- deemed beneficial.
-
- The exchange will set an "Etag", and subsequent requests of the
- same client should provide the tag in an "If-None-Match" header
- to detect if the terms of service have changed. If not, a
- "204 Not Modified" response will be returned.
+.. include:: tos.rst
- If the "Etag" is missing, the client should not cache the response and instead prompt the user again at the next opportunity. This is usually only the case if the terms of service were not configured correctly.
-
-
-.. http:get:: /privacy
-
- Get the privacy policy of the exchange.
- The exchange will consider the "Accept" and "Accept-Language" and
- "Accept-Encoding" headers when generating a response. Specifically,
- it will try to find a response with an acceptable mime-type, then
- pick the version in the most preferred language of the user, and
- finally apply compression if that is allowed by the client and
- deemed beneficial.
-
- The exchange will set an "Etag", and subsequent requests of the
- same client should provide the tag in an "If-None-Match" header
- to detect if the privacy policy has changed. If not, a
- "204 Not Modified" response will be returned.
-
- If the "Etag" is missing, the client should not cache the response and instead prompt the user again at the next opportunity. This is usually only the case if the privacy policy was not configured correctly.
+.. _keys:
---------------------------
Exchange status information
diff --git a/core/api-mailbox.rst b/core/api-mailbox.rst
index 4633777e..33db482d 100644
--- a/core/api-mailbox.rst
+++ b/core/api-mailbox.rst
@@ -29,52 +29,7 @@ for all details not specified in the individual requests.
The `glossary <https://docs.taler.net/glossary.html#glossary>`_
defines all specific terms used in this section.
---------------------
-Terms of service API
---------------------
-
-These APIs allow wallets to obtain the terms of service
-and the privacy policy of the Mailbox.
-
-.. http:get:: /terms
-
- Get the terms of service of the Mailbox.
- The Mailbox will consider the "Accept" and "Accept-Language" and
- "Accept-Encoding" headers when generating a response. Specifically,
- it will try to find a response with an acceptable mime-type, then
- pick the version in the most preferred language of the user, and
- finally apply compression if that is allowed by the client and
- deemed beneficial.
-
- The Mailbox will set an "Etag", and subsequent requests of the
- same client should provide the tag in an "If-None-Match" header
- to detect if the terms of service have changed. If not, a
- "204 Not Modified" response will be returned.
-
- If the "Etag" is missing, the client should not cache the response and
- instead prompt the user again at the next opportunity. This is usually only
- the case if the terms of service were not configured correctly.
-
-
-.. http:get:: /privacy
-
- Get the privacy policy of the Mailbox.
- The Mailbox will consider the "Accept" and "Accept-Language" and
- "Accept-Encoding" headers when generating a response. Specifically,
- it will try to find a response with an acceptable mime-type, then
- pick the version in the most preferred language of the user, and
- finally apply compression if that is allowed by the client and
- deemed beneficial.
-
- The Mailbox will set an "Etag", and subsequent requests of the
- same client should provide the tag in an "If-None-Match" header
- to detect if the privacy policy has changed. If not, a
- "204 Not Modified" response will be returned.
-
- If the "Etag" is missing, the client should not cache the response and
- instead prompt the user again at the next opportunity. This is usually only
- the case if the privacy policy was not configured correctly.
-
+.. include:: tos.rst
-------------------------
Configuration information
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
index b10452b3..1cbb2a01 100644
--- a/core/api-merchant.rst
+++ b/core/api-merchant.rst
@@ -25,6 +25,7 @@ Merchant Backend API
.. contents:: Table of Contents
+
-----------------------
Base URLs and Instances
-----------------------
@@ -3031,7 +3032,7 @@ Scaning the QR code
In this internet page, customers need to enter a price and send the money.
**Response:**
-
+
:http:statuscode:`200 OK`:
The QR code directs us successfully to the payment website.
diff --git a/core/api-sync.rst b/core/api-sync.rst
index 759a4c3f..51e429e4 100644
--- a/core/api-sync.rst
+++ b/core/api-sync.rst
@@ -103,13 +103,15 @@ user's location profiles by linking client IP addresses and client
keys.
---------------------------
-Receiving Terms of Service
---------------------------
+.. include:: tos.rst
+
+-----------------------
+Receiving Configuration
+-----------------------
.. http:get:: /config
- Obtain the terms of service provided by the storage service.
+ Obtain the key configuration settings of the storage service.
**Response:**
@@ -137,9 +139,12 @@ Receiving Terms of Service
}
-
.. _sync:
+----------------------
+Recovering Backup Data
+----------------------
+
.. http:get:: /backups/${ACCOUNT-KEY}
Download latest version of the backup.
@@ -200,6 +205,10 @@ Receiving Terms of Service
signature validation.
+---------------------
+Uploading Backup Data
+---------------------
+
.. http:post:: /backups/${ACCOUNT-KEY}
Upload a new version of the account's database, or download the
diff --git a/core/api-taldir.rst b/core/api-taldir.rst
index 2e846254..88fe5ce1 100644
--- a/core/api-taldir.rst
+++ b/core/api-taldir.rst
@@ -34,48 +34,8 @@ for all details not specified in the individual requests.
The `glossary <https://docs.taler.net/glossary.html#glossary>`_
defines all specific terms used in this section.
---------------------
-Terms of service API
---------------------
-
-These APIs allow wallets to obtain the terms of service
-and the privacy policy of the TalDir.
-
-
-.. http:get:: /terms
-
- Get the terms of service of the TalDir.
- The TalDir will consider the "Accept" and "Accept-Language" and
- "Accept-Encoding" headers when generating a response. Specifically,
- it will try to find a response with an acceptable mime-type, then
- pick the version in the most preferred language of the user, and
- finally apply compression if that is allowed by the client and
- deemed beneficial.
-
- The TalDir will set an "Etag", and subsequent requests of the
- same client should provide the tag in an "If-None-Match" header
- to detect if the terms of service have changed. If not, a
- "204 Not Modified" response will be returned.
-
- If the "Etag" is missing, the client should not cache the response and instead prompt the user again at the next opportunity. This is usually only the case if the terms of service were not configured correctly.
-
-
-.. http:get:: /privacy
-
- Get the privacy policy of the TalDir.
- The TalDir will consider the "Accept" and "Accept-Language" and
- "Accept-Encoding" headers when generating a response. Specifically,
- it will try to find a response with an acceptable mime-type, then
- pick the version in the most preferred language of the user, and
- finally apply compression if that is allowed by the client and
- deemed beneficial.
-
- The TalDir will set an "Etag", and subsequent requests of the
- same client should provide the tag in an "If-None-Match" header
- to detect if the privacy policy has changed. If not, a
- "204 Not Modified" response will be returned.
- If the "Etag" is missing, the client should not cache the response and instead prompt the user again at the next opportunity. This is usually only the case if the privacy policy was not configured correctly.
+.. include:: tos.rst
-------------------------
diff --git a/core/tos.rst b/core/tos.rst
new file mode 100644
index 00000000..0cdb8986
--- /dev/null
+++ b/core/tos.rst
@@ -0,0 +1,42 @@
+--------------------
+Terms of service API
+--------------------
+
+These APIs allow clients to obtain the terms of service
+and the privacy policy of a service.
+
+
+.. http:get:: /terms
+
+ Get the terms of service of the service.
+ The endpoint will consider the "Accept" and "Accept-Language" and
+ "Accept-Encoding" headers when generating a response. Specifically,
+ it will try to find a response with an acceptable mime-type, then
+ pick the version in the most preferred language of the user, and
+ finally apply compression if that is allowed by the client and
+ deemed beneficial.
+
+ The endpoint will set an "Etag", and subsequent requests of the same client
+ should provide the tag in an "If-None-Match" header to detect if the terms
+ of service have changed. If not, a "304 Not Modified" response will be
+ returned. Note that the "304 Not Modified" will also be returned if the
+ client changed the "Accept-Language" or "Accept-Encoding" header. Thus, if
+ the client would like to download the resource in a different language or
+ format, the "If-None-Match" header must be omitted.
+
+ If the "Etag" is missing, the client should not cache the response and
+ instead prompt the user again at the next opportunity. This is usually only
+ the case if the terms of service were not configured correctly.
+
+ When returning a full response (not a "304 Not Modified"), the server
+ should also include a "Acceptable-Languages" header which includes
+ a space-separated list of the languages in which the terms of service
+ are available in. Clients can use this to generate a language switcher
+ for users that may not have expressed a proper language preference.
+
+
+.. http:get:: /privacy
+
+ Get the privacy policy of the service. Behaves the same way as
+ The "/terms" endpoint, except that it returns the privacy policy
+ instead of the terms of service.