summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine A <>2023-10-23 09:54:29 +0000
committerAntoine A <>2023-10-23 09:55:32 +0000
commit3d06ab587f00e19f6da6fd2c544a3584f267705a (patch)
tree9c5cb22ae69cecf9e4e0479809295499af34a867
parent7dc8ad3e5d82ab945dc79a9a52c3127ac7928eab (diff)
downloaddocs-3d06ab587f00e19f6da6fd2c544a3584f267705a.tar.gz
docs-3d06ab587f00e19f6da6fd2c544a3584f267705a.tar.bz2
docs-3d06ab587f00e19f6da6fd2c544a3584f267705a.zip
Improve /monitor and specify fields that are only present if conversion is supported
-rw-r--r--core/api-corebank.rst59
1 files changed, 34 insertions, 25 deletions
diff --git a/core/api-corebank.rst b/core/api-corebank.rst
index 3a6aeeb0..8f1eb32e 100644
--- a/core/api-corebank.rst
+++ b/core/api-corebank.rst
@@ -928,40 +928,45 @@ Monitor
external one, this call lets the bank administrator monitor the cashin
and cashout operations that were made from and to the external currency.
It shows as well figures related to (internal) payments made by a Taler
- exchange component to merchant bank accounts.
+ exchange component to merchant bank accounts. Timeframes are in UTC.
**Request:**
- :query timeframe: this parameter admits one of the following values. It is optional,
- defaulting to 'hour'.
+ :query timeframe: *Optional*.
+ This parameter admits one of the following values. Defaults to 'hour'.
- * hour
- * day
- * month
- * year
- * decade
+ * hour
+ * day
+ * month
+ * year
+ * decade
- :query which: this parameter points at a particular element of the *timeframe* parameter. Following are the admitted values for each one. It is optional, defaulting to the last snapshot taken of the *timeframe* parameter.
+ :query which: *Optional*.
+ This parameter points at a particular element of the *timeframe* parameter.
+ Following are the admitted values for each one.
+ Default to the last snapshot taken of the *timeframe* parameter.
- * hour: from 00 to 23
- * day: from 1 to the last day of the current month.
- * month: from 1 to 12
- * year: Gregorian year in the YYYY format.
- * decade: the least Y0 digits of a Gregorian year. Banks should treat such decades as starting from the year 2000. For example, if Y=2, this decade denotes the years 2020 to 2029.
+ * hour: from 00 to 23
+ * day: from 1 to the last day of the current month.
+ * month: from 1 to 12
+ * year: Gregorian year in the YYYY format.
+ * decade: the least Y0 digits of a Gregorian year. Banks should treat such decades as starting from the year 2000. For example, if Y=2, this decade denotes the years 2020 to 2029.
**Response:**
- :http:statuscode:`200 OK`: the bank responds with `MonitorResponse`.
+ :http:statuscode:`200 OK`:
+ The bank responds with `MonitorResponse`.
- :http:statuscode:`404 Not Found`: the bank doesn't have the conversion service.
+ :http:statuscode:`404 Not Found`:
+ The bank doesn't have the conversion service.
- .. note::
+ :http:statuscode:`400 Bad Request`:
+ This error may indicate that the *which* parameter is not appropriate for the selected *timeframe*. For example, timeframe=month and which=20 would result in this error.
- API consumers may combine the values in the response with other
- factors to serve different views to their users.
+ .. note::
- :http:statuscode:`400 Bad Request`:
- this error may indicate that the *which* parameter is not appropriate for the selected *timeframe*. For example, timeframe=month and which=20 would result in this error.
+ API consumers may combine the values in the response with other
+ factors to serve different views to their users.
.. ts:def:: MonitorResponse
@@ -972,23 +977,27 @@ Monitor
// This number corresponds to how many withdrawals have
// been initiated by a wallet owner. Note: wallet owners
// are NOT required to be customers of the libeufin-bank.
- cashinCount: number;
+ // Only present if conversion is supported
+ cashinCount?: number;
// This amount accounts how much external currency has been
// spent to withdraw Taler coins in the internal currency.
// The exact amount of internal currency being created can be
// calculated using the advertised conversion rates.
- cashinExternalVolume: Amount;
+ // Only present if conversion is supported
+ cashinExternalVolume?: Amount;
// This number identifies how many cashout operations were
// confirmed in the timeframe speficied in the request.
- cashoutCount: number;
+ // Only present if conversion is supported
+ cashoutCount?: number;
// This amount corresponds to how much *external* currency was
// paid by the libeufin-bank administrator to fulfill all the
// confirmed cashouts related to the timeframe specified in the
// request.
- cashoutExternalVolume: Amount;
+ // Only present if conversion is supported
+ cashoutExternalVolume?: Amount;
// This number identifies how many payments were made by a
// Taler exchange to a merchant bank account in the internal