Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
797 changes: 794 additions & 3 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

120 changes: 114 additions & 6 deletions features/v2/report_schedules.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,140 @@ Feature: Report Schedules
Scenario: Create a report schedule returns "Bad Request" response
Given operation "CreateReportSchedule" enabled
And new "CreateReportSchedule" request
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"}}
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": "1w", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Create a report schedule returns "CREATED" response
Given operation "CreateReportSchedule" enabled
And new "CreateReportSchedule" request
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"}}
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": "1w", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
When the request is sent
Then the response status is 201 CREATED

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Create a report schedule returns "Not Found" response
Given operation "CreateReportSchedule" enabled
And new "CreateReportSchedule" request
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"}}
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": "1w", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Delete a report schedule returns "Bad Request" response
Given new "DeleteReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Delete a report schedule returns "Not Found" response
Given new "DeleteReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Delete a report schedule returns "OK" response
Given new "DeleteReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Get a report schedule returns "Bad Request" response
Given new "GetReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Get a report schedule returns "Not Found" response
Given new "GetReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Get a report schedule returns "OK" response
Given new "GetReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Get report schedules for a resource returns "Bad Request" response
Given new "GetReportSchedulesForResource" request
And request contains "resource_type" parameter from "REPLACE.ME"
And request contains "resource_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Get report schedules for a resource returns "Not Found" response
Given new "GetReportSchedulesForResource" request
And request contains "resource_type" parameter from "REPLACE.ME"
And request contains "resource_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Get report schedules for a resource returns "OK" response
Given new "GetReportSchedulesForResource" request
And request contains "resource_type" parameter from "REPLACE.ME"
And request contains "resource_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: List report schedules returns "Bad Request" response
Given new "ListReportSchedules" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: List report schedules returns "Not Found" response
Given new "ListReportSchedules" request
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: List report schedules returns "OK" response
Given new "ListReportSchedules" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Toggle a report schedule returns "Bad Request" response
Given new "ToggleReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"status": "active"}, "type": "schedule"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Toggle a report schedule returns "Not Found" response
Given new "ToggleReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"status": "active"}, "type": "schedule"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Toggle a report schedule returns "OK" response
Given new "ToggleReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"status": "active"}, "type": "schedule"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/reporting-and-sharing
Scenario: Update a report schedule returns "Bad Request" response
Given operation "PatchReportSchedule" enabled
And new "PatchReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
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"}}
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": "1w", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -47,7 +155,7 @@ Feature: Report Schedules
Given operation "PatchReportSchedule" enabled
And new "PatchReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
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"}}
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": "1w", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
When the request is sent
Then the response status is 404 Not Found

Expand All @@ -56,6 +164,6 @@ Feature: Report Schedules
Given operation "PatchReportSchedule" enabled
And new "PatchReportSchedule" request
And request contains "schedule_uuid" parameter from "REPLACE.ME"
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"}}
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": "1w", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
When the request is sent
Then the response status is 200 OK
38 changes: 38 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6396,16 +6396,54 @@
"CreateReportSchedule": {
"tag": "Report Schedules",
"undo": {
"operationId": "DeleteReportSchedule",
"parameters": [
{
"name": "schedule_uuid",
"source": "<RESPONSE_PATH>data.id"
}
],
"type": "unsafe"
}
},
"ListReportSchedules": {
"tag": "Report Schedules",
"undo": {
"type": "safe"
}
},
"GetReportSchedulesForResource": {
"tag": "Report Schedules",
"undo": {
"type": "safe"
}
},
"DeleteReportSchedule": {
"tag": "Report Schedules",
"undo": {
"type": "idempotent"
}
},
"GetReportSchedule": {
"tag": "Report Schedules",
"undo": {
"type": "safe"
}
},
"PatchReportSchedule": {
"tag": "Report Schedules",
"undo": {
"operationId": "PatchReportSchedule",
"type": "idempotent"
}
},
"ToggleReportSchedule": {
"tag": "Report Schedules",
"undo": {
"operationId": "ToggleReportSchedule",
"type": "idempotent"
}
},
"DeleteRestrictionPolicy": {
"tag": "Restriction Policies",
"undo": {
Expand Down
59 changes: 59 additions & 0 deletions private/bdd_runner/src/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13792,6 +13792,54 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
},
operationResponseType: "ReportScheduleResponse",
},
"ReportSchedulesApi.V2.ListReportSchedules": {
pageLimit: {
type: "number",
format: "int64",
},
pageOffset: {
type: "number",
format: "int64",
},
filterTitle: {
type: "string",
format: "",
},
filterAuthorUuid: {
type: "string",
format: "uuid",
},
filterRecipients: {
type: "string",
format: "",
},
operationResponseType: "ReportScheduleListResponse",
},
"ReportSchedulesApi.V2.GetReportSchedulesForResource": {
resourceType: {
type: "ReportScheduleResourceType",
format: "",
},
resourceId: {
type: "string",
format: "",
},
operationResponseType: "ReportScheduleListResponse",
},
"ReportSchedulesApi.V2.GetReportSchedule": {
scheduleUuid: {
type: "string",
format: "uuid",
},
operationResponseType: "ReportScheduleResponse",
},
"ReportSchedulesApi.V2.DeleteReportSchedule": {
scheduleUuid: {
type: "string",
format: "uuid",
},
operationResponseType: "ReportScheduleResponse",
},
"ReportSchedulesApi.V2.PatchReportSchedule": {
scheduleUuid: {
type: "string",
Expand All @@ -13803,6 +13851,17 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
},
operationResponseType: "ReportScheduleResponse",
},
"ReportSchedulesApi.V2.ToggleReportSchedule": {
scheduleUuid: {
type: "string",
format: "uuid",
},
body: {
type: "ReportScheduleToggleRequest",
format: "",
},
operationResponseType: "ReportScheduleResponse",
},
"RestrictionPoliciesApi.V2.GetRestrictionPolicy": {
resourceId: {
type: "string",
Expand Down
Loading
Loading