taler-docs

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

get-exchanges.rst (1339B)


      1 .. http:get:: /exchanges
      2 
      3   Return information about exchanges configured for this merchant backend.
      4   @since **v26**.
      5 
      6   **Response:**
      7 
      8   :http:statuscode:`200 OK`:
      9     The body is a `ExchangeStatusResponse`.
     10   :http:statuscode:`500 Internal Server Error`:
     11     The server experienced an internal failure.
     12     Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``.
     13 
     14   **Details:**
     15 
     16   .. ts:def:: ExchangeStatusResponse
     17 
     18     interface ExchangeStatusResponse {
     19 
     20       exchanges: ExchangeStatusDetail[];
     21 
     22     }
     23 
     24   .. ts:def:: ExchangeStatusDetail
     25 
     26     interface ExchangeStatusDetail {
     27 
     28       // Base URL of the exchange this is about.
     29       exchange_url: string;
     30 
     31       // Time when the backend will download ``/keys`` next.
     32       next_download: Timestamp;
     33 
     34       // Time when the current ``/keys`` response is expected to
     35       // expire. Missing if we do not have one.
     36       keys_expiration?: Timestamp;
     37 
     38       // HTTP status code returned by the exchange when we asked for
     39       // ``/keys``. 0 if we did not receive an HTTP status code.
     40       // Usually 200 for success.
     41       keys_http_status: Integer;
     42 
     43       // Numeric `error code <error-codes>` indicating an
     44       // error we had processing the ``/keys`` response.
     45       keys_ec: Integer;
     46 
     47       // Human-readable error description matching ``keys_ec``.
     48       keys_hint: string;
     49 
     50     }