taler-docs

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

get-private-reports.rst (1526B)


      1 .. http:get:: [/instances/$INSTANCE]/private/reports
      2 
      3   This is used to return all the scheduled reports
      4   that are present in our backend.
      5 
      6   **Required permission:** ``reports-read``
      7 
      8   **Request:**
      9 
     10   :query limit: *Optional.*
     11     At most return the given number of results. Negative for descending by ``serial``, positive for ascending by ``serial``. Defaults to ``-20``.
     12   :query offset: *Optional.*
     13     Starting ``serial`` for :ref:`pagination <row-id-pagination>`.
     14 
     15   **Response:**
     16 
     17   :http:statuscode:`200 OK`:
     18     The backend has successfully returned all the reports.
     19     Returns a `ReportsSummaryResponse`.
     20 
     21   :http:statuscode:`400 Bad Request`:
     22     A query parameter is malformed.
     23     Returned with ``TALER_EC_GENERIC_PARAMETER_MALFORMED``.
     24   :http:statuscode:`404 Not found`:
     25     The backend has does not know about the instance.
     26   :http:statuscode:`500 Internal Server Error`:
     27     The server experienced an internal failure.
     28     Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``.
     29 
     30   **Details:**
     31 
     32   .. ts:def:: ReportsSummaryResponse
     33 
     34     interface ReportsSummaryResponse {
     35 
     36       // Return reports that are present in our backend.
     37       reports: ReportEntry[];
     38 
     39     }
     40 
     41   The `ReportEntry` object describes a report.
     42   It has the following structure:
     43 
     44   .. ts:def:: ReportEntry
     45 
     46     interface ReportEntry {
     47 
     48       // Report identifier
     49       report_serial: Integer;
     50 
     51       // Description for the report.
     52       description: string;
     53 
     54       // Frequency for the report.
     55       report_frequency: RelativeTime;
     56 
     57     }