report_schedules
Creates, updates, deletes, gets or lists a report_schedules resource.
Overview
| Name | report_schedules |
| Type | Resource |
| Id | datadog.dashboards.report_schedules |
Fields
The following fields are returned by SELECT queries:
- get_report_schedules_for_resource
- get_report_schedule
- list_report_schedules
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the report schedule. (example: 11111111-2222-3333-4444-555555555555) |
attributes | object | The configuration and derived state of a report schedule in a list response. |
relationships | object | Relationships for a report schedule in a list response. |
type | string | JSON:API resource type for report schedules. (schedule) (example: schedule) |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the report schedule. (example: 11111111-2222-3333-4444-555555555555) |
attributes | object | The configuration and derived state of a report schedule. |
relationships | object | Relationships for the report schedule. |
type | string | JSON:API resource type for report schedules. (schedule) (example: schedule) |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the report schedule. (example: 11111111-2222-3333-4444-555555555555) |
attributes | object | The configuration and derived state of a report schedule in a list response. |
relationships | object | Relationships for a report schedule in a list response. |
type | string | JSON:API resource type for report schedules. (schedule) (example: schedule) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_report_schedules_for_resource | select | resource_type, resource_id | Get 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_schedule | select | schedule_uuid | Get a report schedule by its unique identifier.<br />Requires a reporting read permission appropriate to the targeted resource type. | |
list_report_schedules | select | page[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_schedule | insert | data | 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. | |
patch_report_schedule | update | schedule_uuid, data | 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. | |
delete_report_schedule | delete | schedule_uuid | 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. | |
toggle_report_schedule | exec | schedule_uuid, data | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
resource_id | string | The identifier of the resource to fetch report schedules for. (example: abc-def-ghi) |
resource_type | string | The type of resource to fetch report schedules for. |
schedule_uuid | string (uuid) | The unique identifier of the report schedule to toggle. (example: 11111111-2222-3333-4444-555555555555) |
site | string | The 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] | string | Filter schedules by a comma-separated list of recipients. (example: user@example.com,team@example.com) |
filter[title] | string | Filter 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_report_schedules_for_resource
- get_report_schedule
- list_report_schedules
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
;
Get a report schedule by its unique identifier.<br />Requires a reporting read permission appropriate to the targeted resource type.
SELECT
id,
attributes,
relationships,
type
FROM datadog.dashboards.report_schedules
WHERE schedule_uuid = '{{ schedule_uuid }}' -- required
;
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.
SELECT
id,
attributes,
relationships,
type
FROM datadog.dashboards.report_schedules
WHERE page[limit] = '{{ page[limit] }}'
AND page[offset] = '{{ page[offset] }}'
AND filter[title] = '{{ filter[title] }}'
AND filter[author_uuid] = '{{ filter[author_uuid] }}'
AND filter[recipients] = '{{ filter[recipients] }}'
;
INSERT examples
- create_report_schedule
- Manifest
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
;
# Description fields are for documentation purposes
- name: report_schedules
props:
- name: data
description: |
The JSON:API data object for a report schedule creation request.
value:
attributes:
delivery_format: "{{ delivery_format }}"
description: "{{ description }}"
recipients:
- "{{ recipients }}"
resource_id: "{{ resource_id }}"
resource_type: "{{ resource_type }}"
rrule: "{{ rrule }}"
tab_id: "{{ tab_id }}"
template_variables:
- name: "{{ name }}"
values: "{{ values }}"
timeframe: "{{ timeframe }}"
timezone: "{{ timezone }}"
title: "{{ title }}"
type: "{{ type }}"
UPDATE examples
- patch_report_schedule
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_report_schedule
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.
- toggle_report_schedule
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 }}"
}'
;