> Report object

The following objects are directly related to the report API.

Report

The report object has the following properties:

PropertyTypeDescription
reportidstringID of the report.

Property behavior:
- read-only
- required for update operations
useridstringID of the user who created the report.

Property behavior:
- required for create operations
namestringUnique name of the report.

Property behavior:
- required for create operations
dashboardidstringID of the dashboard that the report is based on.

Property behavior:
- required for create operations
periodintegerPeriod for which the report will be prepared.

Possible values:
0 - (default) previous day;
1 - previous week;
2 - previous month;
3 - previous year.
cycleintegerPeriod repeating schedule.

Possible values:
0 - (default) daily;
1 - weekly;
2 - monthly;
3 - yearly.
start_timeintegerTime of the day, in seconds, when the report will be prepared for sending.

Default: 0.
weekdaysintegerDays of the week for sending the report.

Days of the week are stored in binary form with each bit representing the corresponding week day. For example, 12 equals 1100 in binary and means that reports will be sent every Wednesday and Thursday.

Default: 0.

Property behavior:
- required if cycle is set to “weekly”.
active_sincestringOn which date to start.

Possible values:
empty string - (default) not specified (stored as 0);
specific date in YYYY-MM-DD format (stored as a timestamp of the beginning of a day (00:00:00)).
active_tillstringOn which date to end.

Possible values:
empty string - (default) not specified (stored as 0);
specific date in YYYY-MM-DD format (stored as a timestamp of the end of a day (23:59:59)).
subjectstringReport message subject.
messagestringReport message text.
statusintegerWhether the report is enabled or disabled.

Possible values:
0 - Disabled;
1 - (default) Enabled.
descriptiontextDescription of the report.
stateintegerState of the report.

Possible values:
0 - (default) report was not yet processed;
1 - report was generated and successfully sent to all recipients;
2 - report generating failed; “info” contains error information;
3 - report was generated, but sending to some (or all) recipients failed; “info” contains error information.

Property behavior:
- read-only
lastsenttimestampUnix timestamp of the last successfully sent report.

Property behavior:
- read-only
infostringError description or additional information.

Property behavior:
- read-only

Users

The users object has the following properties:

PropertyTypeDescription
useridstringID of user to send the report to.

Property behavior:
- required
access_useridstringID of user on whose behalf the report will be generated.

0 - (default) Generate report by recipient.
excludeintegerWhether to exclude the user from mailing list.

Possible values:
0 - (default) Include;
1 - Exclude.

User groups

The user groups object has the following properties:

PropertyTypeDescription
usrgrpidstringID of user group to send the report to.

Property behavior:
- required
access_useridstringID of user on whose behalf the report will be generated.

0 - (default) Generate report by recipient.