taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

get-aml-OFFICER_PUB-kyc-statistics-NAMES.rst (1861B)


      1 .. http:get:: /aml/$OFFICER_PUB/kyc-statistics/$NAMES
      2 
      3   Returns the number of KYC events matching the space-separated (!)
      4   list of given event types ``$NAMES`` in
      5   the specified time range.  Note that this query can be slow as the
      6   statistics are computed on-demand. (This is OK as such requests should be
      7   rare.)
      8 
      9   This endpoint was introduced in protocol **v20**. It was
     10   modified in **v30** revision 1 to accept a space-separated
     11   list of names instead of a single name and to return an array
     12   of results.
     13 
     14   **Request:**
     15 
     16   *Taler-AML-Officer-Signature*:
     17     The client must provide Base-32 encoded EdDSA signature with
     18     ``$OFFICER_PRIV``, affirming the desire to obtain AML data.  Note that this
     19     is merely a simple authentication mechanism, the details of the request are
     20     not protected by the signature.
     21 
     22   :query start_date=TIMESTAMP:
     23     *Optional*. Specifies the date when to
     24     start looking (inclusive). If not given, the start time of the
     25     exchange operation is used.  The TIMESTAMP is given
     26     in seconds since the UNIX epoch.
     27   :query end_date=TIMESTAMP:
     28     *Optional*. Specifies the date when to
     29     stop looking (exclusive). If not given, the current date is used.  The TIMESTAMP is given
     30     in seconds since the UNIX epoch.
     31 
     32   **Response:**
     33 
     34   :http:statuscode:`200 OK`:
     35     The responds will be an `AmlStatisticsResponse` message.
     36   :http:statuscode:`204 No content`:
     37     All the event counters are zero.
     38 
     39   **Details:**
     40 
     41   .. ts:def:: AmlStatisticsResponse
     42 
     43     interface AmlStatisticsResponse {
     44       // Statistics that were found.
     45       statistics: EventCounter[];
     46     }
     47 
     48 
     49   .. ts:def:: EventCounter
     50 
     51     interface EventCounter {
     52       // Name of the statistic that is being returned.
     53       name: string;
     54 
     55       // Number of events of the specified type in
     56       // the given range.
     57       counter: Integer;
     58 
     59     }