|
| 1 | +@endpoint(report-schedules) @endpoint(report-schedules-v2) |
| 2 | +Feature: Report Schedules |
| 3 | + Create and manage scheduled reports. A scheduled report renders a |
| 4 | + dashboard or integration dashboard on a recurring cadence and delivers it |
| 5 | + to a set of recipients over email, Slack, or Microsoft Teams. |
| 6 | + |
| 7 | + Background: |
| 8 | + Given a valid "apiKeyAuth" key in the system |
| 9 | + And a valid "appKeyAuth" key in the system |
| 10 | + And an instance of "ReportSchedules" API |
| 11 | + |
| 12 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 13 | + Scenario: Create a report schedule returns "Bad Request" response |
| 14 | + Given operation "CreateReportSchedule" enabled |
| 15 | + And new "CreateReportSchedule" request |
| 16 | + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "resource_id": "abc-def-ghi", "resource_type": "dashboard", "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} |
| 17 | + When the request is sent |
| 18 | + Then the response status is 400 Bad Request |
| 19 | + |
| 20 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 21 | + Scenario: Create a report schedule returns "CREATED" response |
| 22 | + Given operation "CreateReportSchedule" enabled |
| 23 | + And new "CreateReportSchedule" request |
| 24 | + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "resource_id": "abc-def-ghi", "resource_type": "dashboard", "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} |
| 25 | + When the request is sent |
| 26 | + Then the response status is 201 CREATED |
| 27 | + |
| 28 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 29 | + Scenario: Create a report schedule returns "Not Found" response |
| 30 | + Given operation "CreateReportSchedule" enabled |
| 31 | + And new "CreateReportSchedule" request |
| 32 | + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "resource_id": "abc-def-ghi", "resource_type": "dashboard", "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} |
| 33 | + When the request is sent |
| 34 | + Then the response status is 404 Not Found |
| 35 | + |
| 36 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 37 | + Scenario: Update a report schedule returns "Bad Request" response |
| 38 | + Given operation "PatchReportSchedule" enabled |
| 39 | + And new "PatchReportSchedule" request |
| 40 | + And request contains "schedule_uuid" parameter from "REPLACE.ME" |
| 41 | + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Updated weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} |
| 42 | + When the request is sent |
| 43 | + Then the response status is 400 Bad Request |
| 44 | + |
| 45 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 46 | + Scenario: Update a report schedule returns "Not Found" response |
| 47 | + Given operation "PatchReportSchedule" enabled |
| 48 | + And new "PatchReportSchedule" request |
| 49 | + And request contains "schedule_uuid" parameter from "REPLACE.ME" |
| 50 | + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Updated weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} |
| 51 | + When the request is sent |
| 52 | + Then the response status is 404 Not Found |
| 53 | + |
| 54 | + @generated @skip @team:DataDog/reporting-and-sharing |
| 55 | + Scenario: Update a report schedule returns "OK" response |
| 56 | + Given operation "PatchReportSchedule" enabled |
| 57 | + And new "PatchReportSchedule" request |
| 58 | + And request contains "schedule_uuid" parameter from "REPLACE.ME" |
| 59 | + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Updated weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} |
| 60 | + When the request is sent |
| 61 | + Then the response status is 200 OK |
0 commit comments