post-reports-REPORT_ID.rst (1377B)
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:`413 Request entity too large`: 25 The uploaded body is to long, it exceeds the size limit. 26 Returned with an error code of 27 ``TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT``. 28 :http:statuscode:`500 Internal Server Error`: 29 The server experienced an internal failure. 30 Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 31 32 **Details:** 33 34 .. ts:def:: ReportGenerationRequest 35 36 interface ReportGenerationRequest { 37 38 // Report token authorizing the report generation. 39 report_token: ShortHashCode; 40 41 }