summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-03-20 13:19:47 +0100
committerChristian Grothoff <grothoff@gnunet.org>2022-03-20 13:19:47 +0100
commiteecbb4fdc2756b19e8aa630e93c04a19044b3922 (patch)
tree37cd060e3d07ed98633382e0ec1eb4fcc763eb7e /core
parent35ff3bcfd31e85f6731dbc545078c8c18c4748bb (diff)
downloaddocs-eecbb4fdc2756b19e8aa630e93c04a19044b3922.tar.gz
docs-eecbb4fdc2756b19e8aa630e93c04a19044b3922.tar.bz2
docs-eecbb4fdc2756b19e8aa630e93c04a19044b3922.zip
update new reserve status/history APIs
Diffstat (limited to 'core')
-rw-r--r--core/api-exchange.rst46
1 files changed, 28 insertions, 18 deletions
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
index a01c7a7f..03c9c235 100644
--- a/core/api-exchange.rst
+++ b/core/api-exchange.rst
@@ -144,7 +144,7 @@ possibly by using HTTPS.
recoup: Recoup[];
// Array of globally applicable fees by time range.
- GlobalFees[];
+ global_fees: GlobalFees[];
// The date when the denomination keys were last updated.
list_issue_date: Timestamp;
@@ -176,10 +176,6 @@ possibly by using HTTPS.
.. ts:def:: GlobalFees
- .. note::
-
- This is a draft API that is not yet implemented.
-
interface GlobalFees {
// What date (inclusive) does these fees go into effect?
@@ -1101,22 +1097,36 @@ exchange.
advertise those terms of service.
-.. http:post:: /reserves/$RESERVE_PUB/status
+.. http:get:: /reserves/$RESERVE_PUB
- Request information about a reserve or an account.
+ Request information about a reserve.
- .. note::
+ **Request:**
- This is a draft API that is not yet implemented.
+ :query timeout_ms=MILLISECONDS: *Optional.* If specified, the exchange will wait up to MILLISECONDS for incoming funds before returning a 404 if the reserve does not yet exist.
- **Request:**
+ **Response:**
- :query history=BOOLEAN: *Optional.* If specified, the exchange
- will return the recent account history.
- This is still free of charge.
- :query full_history=BOOLEAN: *Optional.* If 'true' is specified,
- the exchange will return the full account history. This
- may incur a fee that will be charged to the account.
+ :http:statuscode:`200 OK`:
+ The exchange responds with a `ReserveSummary` object; the reserve was known to the exchange.
+ :http:statuscode:`404 Not found`:
+ The reserve key does not belong to a reserve known to the exchange.
+
+ **Details:**
+
+ .. ts:def:: ReserveSummary
+
+ interface ReserveSummary {
+ // Balance left in the reserve.
+ balance: Amount;
+ }
+
+
+.. http:post:: /reserves/$RESERVE_PUB/status
+
+ Request information about a reserve or an account.
+
+ **Request:**
The request body must be a `ReserveStatusRequest` object.
@@ -1125,7 +1135,7 @@ exchange.
:http:statuscode:`200 OK`:
The exchange responds with a `ReserveStatus` object; the reserve was known to the exchange.
:http:statuscode:`401 Unauthorized`:
- The *Account-Request-Signature* is invalid.
+ The *TALER_SIGNATURE_RESERVE_STATUS_REQUEST* signature is invalid.
This response comes with a standard `ErrorDetail` response.
:http:statuscode:`403 Forbidden`:
The provided timestamp is not close to the current time.
@@ -1378,7 +1388,7 @@ exchange.
:http:statuscode:`200 OK`:
The exchange responds with a `ReserveStatus` object; the reserve was known to the exchange.
:http:statuscode:`401 Unauthorized`:
- The *Account-Request-Signature* is invalid.
+ The *TALER_SIGNATURE_RESERVE_HISTORY_REQUEST* is invalid.
This response comes with a standard `ErrorDetail` response.
:http:statuscode:`403 Forbidden`:
The provided timestamp is not close to the current time.