taler-docs

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

get-diagnostics.rst (1814B)


      1 .. ts:op:: getDiagnostics
      2   :read-only:
      3 
      4   Get a diagnostics report about the state of the wallet, serialized
      5   as a string in the requested format.
      6 
      7   **Request:**
      8 
      9     The request arguments must be a `GetDiagnosticsRequest` object.
     10 
     11   **Response:**
     12 
     13     On success, the result is a `GetDiagnosticsResponse`: the
     14     diagnostics report serialized as a string.
     15 
     16   **Expected errors:**
     17 
     18     The caller can handle the following errors inline:
     19     ``WALLET_CORE_API_BAD_REQUEST``.
     20 
     21   **Details:**
     22 
     23     The report is privacy-scrubbed: transaction identifiers are
     24     replaced by synthetic labels.  It contains the wallet-core
     25     version, the database backend with record counts, the known
     26     exchanges, coins, bank accounts and the newest transactions (at
     27     most ``transactionLimit`` of them).  The
     28     ``WALLET_CORE_API_BAD_REQUEST`` error is raised when
     29     ``transactionLimit`` is not a non-negative safe integer smaller
     30     than ``Number.MAX_SAFE_INTEGER``.
     31 
     32 .. ts:def:: GetDiagnosticsRequest
     33 
     34   interface GetDiagnosticsRequest {
     35     // Serialized output format.  Defaults to JSON.
     36     format?: DiagnosticsFormat;
     37 
     38     // Maximum number of newest transactions to include.  Defaults to 100.
     39     transactionLimit?: number;
     40 
     41     // Information supplied by the wallet frontend invoking wallet-core.
     42     frontendInfo?: DiagnosticsFrontendInfo;
     43   }
     44 
     45 .. ts:def:: DiagnosticsFormat
     46 
     47   type DiagnosticsFormat = "json" | "yaml";
     48 
     49 .. ts:def:: DiagnosticsFrontendInfo
     50 
     51   interface DiagnosticsFrontendInfo {
     52     name: string;
     53     version: string;
     54     platform?: string;
     55   }
     56 
     57 .. ts:def:: GetDiagnosticsResponse
     58 
     59   // A serialized diagnostics report in the requested format, returned
     60   // as a string so that clients can save it without depending on the
     61   // report's internal schema.
     62   type GetDiagnosticsResponse = string;