commit 9d48c8f14f82a558585665589098b9d7577ac3e3
parent 067dc16866716539c4fd03284de9b64b190b7255
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 4 Aug 2026 22:24:46 +0200
new auditor endpoints
Diffstat:
2 files changed, 101 insertions(+), 0 deletions(-)
diff --git a/core/auditor/get-monitoring-kycauth-in-inconsistency.rst b/core/auditor/get-monitoring-kycauth-in-inconsistency.rst
@@ -0,0 +1,73 @@
+.. http:get:: /monitoring/kycauth-in-inconsistency
+
+ Get a list of KYCAUTH in inconsistencies stored by the auditor.
+
+ The following query parameters are optional, and can be used to customise the response:
+
+ **Request:**
+
+ :query limit: A signed integer, indicating how many elements relative to the offset query parameter should be returned. The default value is -20.
+ :query offset: An unsigned integer, indicating from which row onward to return elements. The default value is INT_MAX.
+ :query return_suppressed: A boolean. If true, returns all eligible rows, otherwise only returns eligible rows that are not suppressed. The default value is false.
+
+
+ With the default settings, the endpoint returns at most the 20 latest elements that are not suppressed.
+
+ **Response:**
+
+ :http:statuscode:`200 OK`:
+ The auditor responds with a top level array of :ts:type:`KycauthInInconsistency` objects.
+ :http:statuscode:`400 Bad request`:
+ The request is malformed. Returned with an
+ ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` error code.
+ :http:statuscode:`401 Unauthorized`:
+ The request lacks valid authentication credentials.
+ The response comes with a ``TALER_EC_AUDITOR_GENERIC_UNAUTHORIZED``.
+ :http:statuscode:`500 Internal Server Error`:
+ The server experienced an internal error.
+ The response comes with a ``TALER_EC_GENERIC_DB_SETUP_FAILED`` or
+ ``TALER_EC_GENERIC_DB_FETCH_FAILED`` error code.
+
+ **Details:**
+
+ .. ts:def:: KycauthInInconsistency
+
+ interface KycauthInInconsistency {
+
+ // Unique row identifier
+ row_id : Integer;
+
+ // Row of the wire transfer in the bank's credit history. This is
+ // what the two sides are matched on.
+ bank_row_id : Integer;
+
+ // Amount the exchange booked for this transfer, zero if the
+ // exchange has no record of it at all.
+ amount_exchange_expected : Amount;
+
+ // Amount the bank reports for this transfer, zero if the bank does
+ // not report it at all.
+ amount_wired : Amount;
+
+ // Account public key the transfer established, as known to
+ // whichever side did report the transfer.
+ account_pub : EddsaPublicKey;
+
+ // Time of the transfer
+ timestamp : Timestamp;
+
+ // Bank account that was debited, as known to whichever side did
+ // report the transfer.
+ account : string;
+
+ // Human readable diagnostic of the problem
+ diagnostic : string;
+
+ // True if this diagnostic was suppressed.
+ suppressed : boolean;
+
+ }
+
+ .. note::
+
+ This endpoint is still experimental. The endpoint will be further developed as needed.
diff --git a/core/auditor/patch-monitoring-kycauth-in-inconsistency-SERIAL_ID.rst b/core/auditor/patch-monitoring-kycauth-in-inconsistency-SERIAL_ID.rst
@@ -0,0 +1,28 @@
+.. http:patch:: /monitoring/kycauth-in-inconsistency/$SERIAL_ID
+
+ This endpoint is used to suppress select elements of KYCAUTH in inconsistencies.
+ Update the 'suppressed' field of a KYCAUTH in inconsistency element with row_id $SERIAL_ID, according to :ts:type:`GenericAuditorMonitorPatchRequest`, stored by the auditor.
+
+ **Response:**
+
+ :http:statuscode:`204 No Content`:
+ The element has been updated.
+ :http:statuscode:`400 Bad Request`:
+ The request body is invalid or the ``$SERIAL_ID`` is not a valid row identifier.
+ The response comes with a ``TALER_EC_GENERIC_JSON_INVALID`` or
+ ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` error code.
+ :http:statuscode:`401 Unauthorized`:
+ The request lacks valid authentication credentials.
+ The response comes with a ``TALER_EC_AUDITOR_GENERIC_UNAUTHORIZED``.
+ :http:statuscode:`404 Not found`:
+ The specified row was not found.
+ The response comes with a ``TALER_EC_AUDITOR_RESOURCE_NOT_FOUND`` error code.
+ :http:statuscode:`500 Internal Server Error`:
+ The server experienced an internal error.
+ The response comes with a ``TALER_EC_GENERIC_DB_SETUP_FAILED``,
+ ``TALER_EC_GENERIC_DB_STORE_FAILED``, or
+ ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE`` error code.
+
+ .. note::
+
+ This endpoint is still experimental. The endpoint will be further developed as needed.