- GET /aml/$OFFICER_PUB/kyc-statistics/$NAMES#
Returns the number of KYC events matching the space-separated (!) list of given event types
$NAMESin the specified time range. Note that this query can be slow as the statistics are computed on-demand. (This is OK as such requests should be rare.)This endpoint was introduced in protocol v20. It was modified in v30 revision 1 to accept a space-separated list of names instead of a single name and to return an array of results.
Request:
- Taler-AML-Officer-Signature:
The client must provide Base-32 encoded EdDSA signature with
$OFFICER_PRIV, affirming the desire to obtain AML data. Note that this is merely a simple authentication mechanism, the details of the request are not protected by the signature.
- Query Parameters:
start_date=TIMESTAMP – Optional. Specifies the date when to start looking (inclusive). If not given, the start time of the exchange operation is used. The TIMESTAMP is given in seconds since the UNIX epoch.
end_date=TIMESTAMP – Optional. Specifies the date when to stop looking (exclusive). If not given, the current date is used. The TIMESTAMP is given in seconds since the UNIX epoch.
Response:
- 200 OK:
The responds will be an AmlStatisticsResponse message.
- 204 No content:
All the event counters are zero.
- 400 Bad Request:
The request is malformed. Cases include: - The
$H_OFFICER_PUBpath segment is malformed.This response comes with a standard ErrorDetail response with a code of
TALER_EC_GENERIC_PATH_SEGMENT_MALFORMED.The required HTTP header with the signature is missing. Returned with
TALER_EC_GENERIC_HTTP_HEADERS_MALFORMED.
- 403 Forbidden:
Two cases: - The signature is invalid. Returned with a code of
TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_GET_SIGNATURE_INVALID.The specific officer is unknown or disabled. Returned with a code of
TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_ACCESS_DENIED.
- 414 URI Too Long:
The statistics names string in the URL is too long. This response comes with a standard ErrorDetail response with a code of
TALER_EC_GENERIC_URI_TOO_LONG.- 500 Internal server error:
The server had an internal problem handling the request. The error code is usually a
TALER_EC_GENERIC_DB_FETCH_FAILED.
Details:
interface AmlStatisticsResponse { // Statistics that were found. statistics: EventCounter[]; }
interface EventCounter { // Name of the statistic that is being returned. event: string; // Number of events of the specified type in // the given range. counter: Integer; }