- POST [/instances/$INSTANCE]/private/reports#
This is used to schedule the generation of periodic reports.
Required permission:
reports-writeRequest:
The request must be a ReportAddRequest.
Response:
- 200 OK:
The backend has successfully added a new report. Returns a ReportAddedResponse.
- 400 Bad request:
Malformed JSON or missing fields. Returned with
TALER_EC_GENERIC_PARAMETER_MALFORMED.- 404 Not found:
The merchant instance is unknown.
- 500 Internal Server Error:
The server experienced an internal failure. Returned with
TALER_EC_GENERIC_DB_STORE_FAILED.- 501 Not implemented:
The report generator specified in the
program_sectionis not configured. Returned withTALER_EC_MERCHANT_GENERIC_REPORT_GENERATOR_UNCONFIGURED.
Details:
interface ReportAddRequest { // Description of the report. Possibly included // in the report message. description: string; // Merchant backend configuration section specifying // the program to use to transmit the report program_section: string; // Mime-type to request from the data source. mime_type: string; // URL under the instance to request the data from. // Must start with '/'. The base URL and the instance // prefix will be prefixed to the given data source. data_source: string; // Address where the report program should send // the report. target_address: string; // Report frequency report_frequency: RelativeTime; // Report frequency shift. Defaults to zero if missing. report_frequency_shift?: RelativeTime; }
interface ReportAddedResponse { // Unique ID for the report. report_serial_id: Integer; }