Sending a report via email

This endpoint allows you to send a report via email to specific users or groups. You can include the report as a PDF or PNG attachment, and optionally include the data as a CSV or Excel file. Simply specify the report ID in the URL, and provide the required export types along with the target recipients.

Sending an email
POST /api/v1/reports/REPORT ID/send/

Required fields:

export_typeDocument export type PDF or PNG (not required if it is an email). ( Possible values: pdf | png | no )
export_data_typeData export type CSV or Excel (not required if it is an email or document export type selected). ( Possible values: csv | xlsx | no )

Optional fields:

usersA list of User IDs (e.g. [3, 4]).
groupsA list of Group IDs(e.g. [3, 4]).

Creating a group example

curl 'https://acmeinc.datareportive.com/api/v1/reports/167/send/' \
            -X POST \
            -H 'Authorization: Token [ TOKEN ]' \
            -H 'Content-Type: application/json' \
            -d '{"export_type":"pdf", "users":[22],"export_data_type":"no"}'