You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Add the reporting features
* docs: Update the Readme.md
*fix: Update the unit tests
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@@ -746,3 +749,70 @@ The class includes all necessary variables to generate an SSO setting object
746
749
-`enabled` _bool_ - Specify if the SSO provider is enabled ornot
747
750
-`scopes` _str_ - Specify the SSO scopes
748
751
752
+
<a id="model.DashboardSchema"></a>
753
+
754
+
## DashboardSchema Objects
755
+
756
+
```python
757
+
@dataclass
758
+
class DashboardSchema()
759
+
```
760
+
761
+
The class includes all necessary variables to generate a dashboard schema object that is used for the reporting functionality
762
+
763
+
**Arguments**:
764
+
765
+
-`dashboard_uid` _str_ - Specify the dashboard uid
766
+
-`time_range_from` _str_ - Specify the dashboard time rangefrom
767
+
-`time_range_to` _str_ - Specify the dashboard time range to
768
+
-`report_variables` _dict_ - Specify the key-value pairs containing the template variables for this report, indictformat. If the value isNone, the template variables from the reports dashboard will be used (default None)
769
+
770
+
<a id="model.Report"></a>
771
+
772
+
## Report Objects
773
+
774
+
```python
775
+
@dataclass
776
+
class Report()
777
+
```
778
+
779
+
The class includes all necessary variables to generate a report object
780
+
781
+
**Arguments**:
782
+
783
+
-`name` _str_ - Specify the name of the report that is used as an email subject
784
+
-`recipients` _str_ - Specify the comma-separated list of emails to which to send the report to
785
+
-`reply_to` _str_ - Specify the comma-separated list of emails used in a reply-to field of the report email
786
+
-`message` _str_ - Specify the text message used for the body of the report email
787
+
-`start_date` _str_ - Specify the distribution starts from this date
788
+
-`end_date` _str_ - Specify the distribution end from this date
789
+
-`time_zone` _str_ - Specify the time zone used to schedule report execution
790
+
-`orientation` _str_ - Specify if the orientation should be portrait or landscape
791
+
-`layout` _str_ - Specify if the layout should be grid or simple
792
+
-`enable_dashboard_url` _str_ - Specify if the dashboard url should be added to the bottom of the report email
793
+
-`dashboards` _List[DashboardSchema]_ - Specify the dashboards for which the reports should be generated
794
+
-`frequency` _str_ - Specify how often the report should be sent. Can be once, hourly, daily, weekly, monthly, last or custom. The value last schedules the report for the last day of the month. The value custom schedules the report to be sent on a custom interval. It requires interval_frequency and interval_amount to be specified e.g. every 2 weeks, where 2is an interval_amount and weeks is an interval_frequency (default last)
795
+
-`interval_frequency` _str_ - Specify the type of the custom interval hours, days, weeks, months (default None)
796
+
-`interval_amount` _int_ - Specify the interval amount of the custom type (default 0)
797
+
-`workdays_only` _bool_ - Specify if the report only on Monday-Friday should be sent. Applicable to hourly and daily types of schedule (default None)
798
+
-`formats` _List[str]_ - Specify what kind of attachment to generate for the report. Available report formats are csv, pdf and image. The type csv attaches a CSVfilefor each table panel and the type image embeds an image of a dashboard into the emails body (default List["pdf"])
799
+
800
+
<a id="model.ReportBrandingSettings"></a>
801
+
802
+
## ReportBrandingSettings Objects
803
+
804
+
```python
805
+
@dataclass
806
+
class ReportBrandingSettings()
807
+
```
808
+
809
+
The class includes all necessary variables to generate a report branding settings object
810
+
811
+
**Arguments**:
812
+
813
+
-`report_logo_url` _str_ - Specify the url of an image used as a logo on every page of the report
814
+
-`email_logo_url` _str_ - Specify the url of an image used as a logo in the email
815
+
-`email_footer_mode` _str_ - Specify the email footer mode. Can be sent-by or none. The value sent-by adds a 'Sent by email footer text' footer link to the email. Requires specifying values in the email_footer_text and email_footer_link fields. The value none suppresses adding a 'Sent by' footer link to the email
816
+
-`email_footer_text` _str_ - Specify the text of a URL added to the email 'Sent by' footer (default None)
817
+
-`email_footer_link` _str_ - Specify the url address value added to the email 'Sent by' footer (default None)
-`ValueError` - Missed specifying a necessary value
173
+
-`Exception` - Unspecified error by executing the API call
174
+
175
+
176
+
**Returns**:
177
+
178
+
None
179
+
32
180
<aid="reporting.Reporting.send_report"></a>
33
181
34
182
#### send\_report
@@ -43,9 +191,9 @@ The method includes a functionality to send a report to a specified email addres
43
191
44
192
**Arguments**:
45
193
46
-
-`id`_int_ - Specify the id of sented report. It is the same as in the URL when editing a report, not to be confused with the id of the dashboard.
194
+
-`id`_int_ - Specify the id of forwarded report. It is the same as in the URL when editing a report, not to be confused with the id of the dashboard.
47
195
-`emails`_str_ - Specify the comma-separated list of emails to which to send the report to. Overrides the emails from the report. Required if useEmailsFromReport is not present (default None)
48
-
-`use_emails_from_report`_bool_ - Specify the if the emails inside the report should be used. Required if emails is not present (default None)
196
+
-`use_emails_from_report`_bool_ - Specify if the emails inside the report should be used. Required if emails is not present (default None)
49
197
50
198
Required Permissions:
51
199
-`Action` - reports:send
@@ -58,6 +206,87 @@ The method includes a functionality to send a report to a specified email addres
58
206
-`Exception` - Unspecified error by executing the API call
0 commit comments