Skip to main content

report_schedules

Creates, updates, deletes, gets or lists a report_schedules resource.

Overview

Namereport_schedules
TypeResource
Iddatadog.dashboards.report_schedules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the report schedule. (example: 11111111-2222-3333-4444-555555555555)
attributesobjectThe configuration and derived state of a report schedule in a list response.
relationshipsobjectRelationships for a report schedule in a list response.
typestringJSON:API resource type for report schedules. (schedule) (example: schedule)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_report_schedules_for_resourceselectresource_type, resource_idGet all report schedules that target a dashboard or integration dashboard resource.<br />Requires a reporting read permission appropriate to the targeted resource type.
get_report_scheduleselectschedule_uuidGet a report schedule by its unique identifier.<br />Requires a reporting read permission appropriate to the targeted resource type.
list_report_schedulesselectpage[limit], page[offset], filter[title], filter[author_uuid], filter[recipients]List dashboard and integration dashboard report schedules for the organization.<br />The response is paginated and can be filtered by title, author UUID, or recipients.<br />Requires the generate_dashboard_reports permission.
create_report_scheduleinsertdataCreate a new scheduled report. A schedule renders a dashboard or integration dashboard<br />on a recurring cadence and delivers it to the configured recipients over email, Slack,<br />or Microsoft Teams.<br />Requires the generate_dashboard_reports permission.
patch_report_scheduleupdateschedule_uuid, dataUpdate an existing scheduled report by its identifier. The editable attributes<br />are replaced with the supplied values; the targeted resource (resource_id and<br />resource_type) cannot be changed after creation.<br />Requires the generate_dashboard_reports permission and schedule ownership.
delete_report_scheduledeleteschedule_uuidDelete a report schedule by its unique identifier. The response returns the deleted schedule.<br />Requires a reporting write permission appropriate to the targeted resource type and schedule ownership.
toggle_report_scheduleexecschedule_uuid, dataActivate or pause a report schedule by setting its status to active or inactive.<br />Requires a reporting write permission appropriate to the targeted resource type and schedule ownership.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resource_idstringThe identifier of the resource to fetch report schedules for. (example: abc-def-ghi)
resource_typestringThe type of resource to fetch report schedules for.
schedule_uuidstring (uuid)The unique identifier of the report schedule to toggle. (example: 11111111-2222-3333-4444-555555555555)
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.
filter[author_uuid]string (uuid)Filter schedules by author UUID. (example: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee)
filter[recipients]stringFilter schedules by a comma-separated list of recipients. (example: user@example.com,team@example.com)
filter[title]stringFilter schedules by report title. (example: Weekly)
page[limit]integer (int64)The maximum number of schedules to return. The maximum value is 50. (example: 25)
page[offset]integer (int64)The offset from which to start returning schedules. (example: 0)

SELECT examples

Get all report schedules that target a dashboard or integration dashboard resource.<br />Requires a reporting read permission appropriate to the targeted resource type.

SELECT
id,
attributes,
relationships,
type
FROM datadog.dashboards.report_schedules
WHERE resource_type = '{{ resource_type }}' -- required
AND resource_id = '{{ resource_id }}' -- required
;

INSERT examples

Create a new scheduled report. A schedule renders a dashboard or integration dashboard<br />on a recurring cadence and delivers it to the configured recipients over email, Slack,<br />or Microsoft Teams.<br />Requires the generate_dashboard_reports permission.

INSERT INTO datadog.dashboards.report_schedules (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data,
included
;

UPDATE examples

Update an existing scheduled report by its identifier. The editable attributes<br />are replaced with the supplied values; the targeted resource (resource_id and<br />resource_type) cannot be changed after creation.<br />Requires the generate_dashboard_reports permission and schedule ownership.

UPDATE datadog.dashboards.report_schedules
SET
data = '{{ data }}'
WHERE
schedule_uuid = '{{ schedule_uuid }}' --required
AND data = '{{ data }}' --required
RETURNING
data,
included;

DELETE examples

Delete a report schedule by its unique identifier. The response returns the deleted schedule.<br />Requires a reporting write permission appropriate to the targeted resource type and schedule ownership.

DELETE FROM datadog.dashboards.report_schedules
WHERE schedule_uuid = '{{ schedule_uuid }}' --required
;

Lifecycle Methods

EXEC variables use wire (API) names.

Activate or pause a report schedule by setting its status to active or inactive.<br />Requires a reporting write permission appropriate to the targeted resource type and schedule ownership.

EXEC datadog.dashboards.report_schedules.toggle_report_schedule
@schedule_uuid='{{ schedule_uuid }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;