taler-docs

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

post-private-reports.rst (1612B)


      1 .. http:post:: [/instances/$INSTANCES]/private/reports
      2 
      3   This is used to schedule the generation of periodic reports.
      4 
      5   **Required permission:** ``reports-write``
      6 
      7   **Request:**
      8 
      9   The request must be a `ReportAddRequest`.
     10 
     11   **Response:**
     12 
     13   :http:statuscode:`200 OK`:
     14     The backend has successfully added a new report. Returns a `ReportAddedResponse`.
     15 
     16   :http:statuscode:`404 Not found`:
     17     The merchant instance is unknown.
     18   :http:statuscode:`501 Not implemented`:
     19     The report generator specified in the ``program_section`` is not configured.
     20 
     21   **Details:**
     22 
     23   .. ts:def:: ReportAddRequest
     24 
     25     interface ReportAddRequest {
     26 
     27       // Description of the report. Possibly included
     28       // in the report message.
     29       description: string;
     30 
     31       // Merchant backend configuration section specifying
     32       // the program to use to transmit the report
     33       program_section: string;
     34 
     35       // Mime-type to request from the data source.
     36       mime_type: string;
     37 
     38       // URL under the instance to request the data from.
     39       // Must start with '/'. The base URL and the instance
     40       // prefix will be prefixed to the given data source.
     41       data_source: string;
     42 
     43       // Address where the report program should send
     44       // the report.
     45       target_address: string;
     46 
     47       // Report frequency
     48       report_frequency: RelativeTime;
     49 
     50       // Report frequency shift. Defaults to zero if missing.
     51       report_frequency_shift?: RelativeTime;
     52 
     53     }
     54 
     55   .. ts:def:: ReportAddedResponse
     56 
     57     interface ReportAddedResponse {
     58 
     59       // Unique ID for the report.
     60       report_serial_id: Integer;
     61 
     62     }