DomoScheduledReport
DomoScheduledReport ¶
DomoScheduledReport
dataclass
¶
DomoScheduledReport(
auth: DomoAuth,
schedule_id: str | None = None,
view_id: str | None = None,
name: str | None = None,
enabled: bool | None = None,
raw: dict = dict(),
)
Represents a Domo Report Builder schedule.
Wraps the Scheduled Reports API to allow programmatic triggering of App Studio Report Builder distributions — useful for bridging the gap between Domo Workflows (which lack a native Report Builder tile) and report delivery.
Usage
auth = DomoTokenAuth(domo_instance="mycompany", domo_access_token="...")
By schedule ID¶
report = DomoScheduledReport(schedule_id="abc123", auth=auth) await report.send_now([ReportRecipient.email("user@example.com")])
By view ID¶
report = DomoScheduledReport(view_id="def456", auth=auth) await report.send_now([ReportRecipient.email("user@example.com")])
Using the factory (populates metadata from the API)¶
report = await DomoScheduledReport.get_by_id(auth=auth, schedule_id="abc123")
send_now
async
¶
send_now(
recipients: list[ReportRecipient],
context: RouteContext | None = None,
)
Immediately trigger this report's distribution to the given recipients.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipients
|
list[ReportRecipient]
|
List of ReportRecipient objects |
required |
context
|
RouteContext | None
|
Optional RouteContext |
None
|
Returns:
| Type | Description |
|---|---|
|
ResponseGetData — 202 Accepted on success |
Raises:
| Type | Description |
|---|---|
ReportSchedule_SEND_Error
|
If the send operation fails |
ValueError
|
If neither schedule_id nor view_id is set |
Source code in src/crew_dcs/classes/DomoScheduledReport.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
ReportRecipient
dataclass
¶
ReportRecipient(type: RecipientType, value: str)
A single recipient for a Report Builder distribution.