The reports are generated asynchronously. If mail_to is not given, action returns an url to get resulting report from (see report_data).
POST /api/report_templates/:id/schedule_report/ 200 { "job_id": UNIQUE-REPORT-GENERATING-JOB-UUID "data_url": "/api/v2/report_templates/1/report_data/UNIQUE-REPORT-GENERATING-JOB-UUID" }
POST /api/report_templates/1007981704/schedule_report { "report_template": {} } 200 { "job_id": "JOB-UNIQUE-IDENTIFIER", "data_url": "/api/v2/report_templates/1007981704-report_template182/report_data/JOB-UNIQUE-IDENTIFIER" }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
input_values optional |
Hash of input values where key is the name of input, value is the value for this input Validations:
|
gzip optional |
Compress the report using gzip Validations:
|
mail_to optional |
If set, scheduled report will be delivered via e-mail. Use ‘,’ to separate multiple email addresses. Validations:
|
generate_at optional |
UTC time to generate report at Validations:
|
report_format optional |
Report format, defaults to ‘csv’ Validations:
|