From eecbb4fdc2756b19e8aa630e93c04a19044b3922 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 20 Mar 2022 13:19:47 +0100 Subject: update new reserve status/history APIs --- core/api-exchange.rst | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) (limited to 'core') 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. -- cgit v1.2.3