post-reports-REPORT_ID.rst (1183B)
1 .. http:post:: /reports/$REPORT_ID 2 3 This is used to request the generation of a periodic report. 4 It is used internally by the ``taler-merchant-report-generator``. 5 The endpoint itself is unauthenticated, but the ``report-token`` 6 serves to authorize the request. 7 8 **Request:** 9 10 The request must be a `ReportGenerationRequest`. 11 12 **Response:** 13 14 :http:statuscode:`200 OK`: 15 The backend has successfully added a new report. 16 Details returned (including the content type) depend 17 fully on the type of report that was requested. 18 :http:statuscode:`400 Bad request`: 19 Malformed JSON or missing fields. 20 Returned with ``TALER_EC_GENERIC_PARAMETER_MALFORMED``. 21 :http:statuscode:`404 Not found`: 22 The report ID *or* the report token are unknown. 23 Returned with ``TALER_EC_MERCHANT_GENERIC_REPORT_UNKNOWN``. 24 :http:statuscode:`500 Internal Server Error`: 25 The server experienced an internal failure. 26 Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 27 28 **Details:** 29 30 .. ts:def:: ReportGenerationRequest 31 32 interface ReportGenerationRequest { 33 34 // Report token authorizing the report generation. 35 report_token: ShortHashCode; 36 37 }