Skip to content

Remove private beta for Downtimes v2 #1645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.5",
"regenerated": "2023-09-07 17:53:35.006145",
"spec_repo_commit": "40dbfff2"
"regenerated": "2023-09-12 16:36:00.939646",
"spec_repo_commit": "cbc99635"
},
"v2": {
"apigentools_version": "1.6.5",
"regenerated": "2023-09-07 17:53:35.025696",
"spec_repo_commit": "40dbfff2"
"regenerated": "2023-09-12 16:36:00.958621",
"spec_repo_commit": "cbc99635"
}
}
}
18 changes: 0 additions & 18 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18853,9 +18853,6 @@ paths:
limitParam: page[limit]
pageOffsetParam: page[offset]
resultsPath: data
x-unstable: '**Note**: This endpoint is in private beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
post:
description: Schedule a downtime.
operationId: CreateDowntime
Expand Down Expand Up @@ -18896,9 +18893,6 @@ paths:
tags:
- Downtimes
x-codegen-request-body-name: body
x-unstable: '**Note**: This endpoint is in private beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/downtime/{downtime_id}:
delete:
description: Cancel a downtime.
Expand Down Expand Up @@ -18936,9 +18930,6 @@ paths:
summary: Cancel a downtime
tags:
- Downtimes
x-unstable: '**Note**: This endpoint is in private beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
get:
description: Get downtime detail by `downtime_id`.
operationId: GetDowntime
Expand Down Expand Up @@ -18995,9 +18986,6 @@ paths:
summary: Get a downtime
tags:
- Downtimes
x-unstable: '**Note**: This endpoint is in private beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
patch:
description: Update a downtime by `downtime_id`.
operationId: UpdateDowntime
Expand Down Expand Up @@ -19052,9 +19040,6 @@ paths:
tags:
- Downtimes
x-codegen-request-body-name: body
x-unstable: '**Note**: This endpoint is in private beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/events:
get:
description: 'List endpoint returns events that match an events search query.
Expand Down Expand Up @@ -22619,9 +22604,6 @@ paths:
tags:
- Downtimes
x-codegen-request-body-name: body
x-unstable: '**Note**: This endpoint is in private beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/permissions:
get:
description: Returns a list of all permissions, including name, description,
Expand Down
1 change: 0 additions & 1 deletion examples/v2/downtimes/CancelDowntime.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
DOWNTIME_V2_DATA_ID = environ["DOWNTIME_V2_DATA_ID"]

configuration = Configuration()
configuration.unstable_operations["cancel_downtime"] = True
with ApiClient(configuration) as api_client:
api_instance = DowntimesApi(api_client)
api_instance.cancel_downtime(
Expand Down
1 change: 0 additions & 1 deletion examples/v2/downtimes/CreateDowntime.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
)

configuration = Configuration()
configuration.unstable_operations["create_downtime"] = True
with ApiClient(configuration) as api_client:
api_instance = DowntimesApi(api_client)
response = api_instance.create_downtime(body=body)
Expand Down
1 change: 0 additions & 1 deletion examples/v2/downtimes/GetDowntime.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
DOWNTIME_V2_DATA_ID = environ["DOWNTIME_V2_DATA_ID"]

configuration = Configuration()
configuration.unstable_operations["get_downtime"] = True
with ApiClient(configuration) as api_client:
api_instance = DowntimesApi(api_client)
response = api_instance.get_downtime(
Expand Down
1 change: 0 additions & 1 deletion examples/v2/downtimes/ListDowntimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from datadog_api_client.v2.api.downtimes_api import DowntimesApi

configuration = Configuration()
configuration.unstable_operations["list_downtimes"] = True
with ApiClient(configuration) as api_client:
api_instance = DowntimesApi(api_client)
response = api_instance.list_downtimes()
Expand Down
1 change: 0 additions & 1 deletion examples/v2/downtimes/ListDowntimes_805770330.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from datadog_api_client.v2.api.downtimes_api import DowntimesApi

configuration = Configuration()
configuration.unstable_operations["list_downtimes"] = True
with ApiClient(configuration) as api_client:
api_instance = DowntimesApi(api_client)
items = api_instance.list_downtimes_with_pagination(
Expand Down
1 change: 0 additions & 1 deletion examples/v2/downtimes/ListMonitorDowntimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from datadog_api_client.v2.api.downtimes_api import DowntimesApi

configuration = Configuration()
configuration.unstable_operations["list_monitor_downtimes"] = True
with ApiClient(configuration) as api_client:
api_instance = DowntimesApi(api_client)
response = api_instance.list_monitor_downtimes(
Expand Down
1 change: 0 additions & 1 deletion examples/v2/downtimes/ListMonitorDowntimes_128979780.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from datadog_api_client.v2.api.downtimes_api import DowntimesApi

configuration = Configuration()
configuration.unstable_operations["list_monitor_downtimes"] = True
with ApiClient(configuration) as api_client:
api_instance = DowntimesApi(api_client)
response = api_instance.list_monitor_downtimes(
Expand Down
1 change: 0 additions & 1 deletion examples/v2/downtimes/UpdateDowntime.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
)

configuration = Configuration()
configuration.unstable_operations["update_downtime"] = True
with ApiClient(configuration) as api_client:
api_instance = DowntimesApi(api_client)
response = api_instance.update_downtime(downtime_id=DOWNTIME_V2_DATA_ID, body=body)
Expand Down
6 changes: 0 additions & 6 deletions src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,6 @@ def __init__(
self.unstable_operations = _UnstableOperations(
{
"v2.create_ci_app_pipeline_event": False,
"v2.cancel_downtime": False,
"v2.create_downtime": False,
"v2.get_downtime": False,
"v2.list_downtimes": False,
"v2.list_monitor_downtimes": False,
"v2.update_downtime": False,
"v2.list_events": False,
"v2.search_events": False,
"v2.create_incident": False,
Expand Down
22 changes: 3 additions & 19 deletions tests/v2/features/downtimes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ Feature: Downtimes
@skip-validation @team:DataDog/monitor-app
Scenario: Cancel a downtime returns "Downtime not found" response
Given new "CancelDowntime" request
And operation "CancelDowntime" enabled
And request contains "downtime_id" parameter with value "00000000-0000-1234-0000-000000000000"
When the request is sent
Then the response status is 404 Downtime not found

@team:DataDog/monitor-app
Scenario: Cancel a downtime returns "OK" response
Given there is a valid "downtime_v2" in the system
And operation "CancelDowntime" enabled
And new "CancelDowntime" request
And request contains "downtime_id" parameter from "downtime_v2.data.id"
When the request is sent
Expand All @@ -33,23 +31,20 @@ Feature: Downtimes
@skip-validation @team:DataDog/monitor-app
Scenario: Get a downtime returns "Bad Request" response
Given new "GetDowntime" request
And operation "GetDowntime" enabled
And request contains "downtime_id" parameter with value "INVALID_UUID_LENGTH"
When the request is sent
Then the response status is 400 Bad Request

@skip-validation @team:DataDog/monitor-app
Scenario: Get a downtime returns "Not Found" response
Given new "GetDowntime" request
And operation "GetDowntime" enabled
And request contains "downtime_id" parameter with value "00000000-0000-1234-0000-000000000000"
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/monitor-app
Scenario: Get a downtime returns "OK" response
Given there is a valid "downtime_v2" in the system
And operation "GetDowntime" enabled
And new "GetDowntime" request
And request contains "downtime_id" parameter from "downtime_v2.data.id"
When the request is sent
Expand All @@ -58,32 +53,28 @@ Feature: Downtimes

@generated @skip @team:DataDog/monitor-app
Scenario: Get active downtimes for a monitor returns "Monitor Not Found error" response
Given operation "ListMonitorDowntimes" enabled
And new "ListMonitorDowntimes" request
Given new "ListMonitorDowntimes" request
And request contains "monitor_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Monitor Not Found error

@generated @skip @team:DataDog/monitor-app
Scenario: Get active downtimes for a monitor returns "OK" response
Given operation "ListMonitorDowntimes" enabled
And new "ListMonitorDowntimes" request
Given new "ListMonitorDowntimes" request
And request contains "monitor_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@team:DataDog/monitor-app
Scenario: Get all downtimes for a monitor returns "Monitor Not Found error" response
Given new "ListMonitorDowntimes" request
And operation "ListMonitorDowntimes" enabled
And request contains "monitor_id" parameter with value 0
When the request is sent
Then the response status is 404 Monitor Not Found error

@replay-only @team:DataDog/monitor-app
Scenario: Get all downtimes for a monitor returns "OK" response
Given new "ListMonitorDowntimes" request
And operation "ListMonitorDowntimes" enabled
And request contains "monitor_id" parameter with value 35534610
When the request is sent
Then the response status is 200 OK
Expand All @@ -93,15 +84,13 @@ Feature: Downtimes
@replay-only @team:DataDog/monitor-app
Scenario: Get all downtimes returns "OK" response
Given new "ListDowntimes" request
And operation "ListDowntimes" enabled
When the request is sent
Then the response status is 200 OK
And the response "data" has item with field "id" with value "1dcb33f8-b23a-11ed-ae77-da7ad0900002"

@replay-only @skip-validation @team:DataDog/monitor-app @with-pagination
Scenario: Get all downtimes returns "OK" response with pagination
Given operation "ListDowntimes" enabled
And new "ListDowntimes" request
Given new "ListDowntimes" request
And request contains "page[limit]" parameter with value 2
When the request with pagination is sent
Then the response status is 200 OK
Expand All @@ -110,15 +99,13 @@ Feature: Downtimes
@skip-validation @team:DataDog/monitor-app
Scenario: Schedule a downtime returns "Bad Request" response
Given new "CreateDowntime" request
And operation "CreateDowntime" enabled
And body with value { "data": { "attributes": { "monitor_identifier": { "monitor_tags": ["cat:hat"] }, "scope": "BAD_SCOPE_MISSING_KEY_VALUE_FORMAT", "schedule": {"start": null } }, "type": "downtime" } }
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/monitor-app
Scenario: Schedule a downtime returns "OK" response
Given new "CreateDowntime" request
And operation "CreateDowntime" enabled
And body with value { "data": { "attributes": { "message": "dark forest", "monitor_identifier": { "monitor_tags": ["cat:hat"] }, "scope": "test:{{ unique_lower_alnum }}", "schedule": {"start": null } }, "type": "downtime" } }
When the request is sent
Then the response status is 200 OK
Expand All @@ -127,7 +114,6 @@ Feature: Downtimes
@skip-java @skip-python @skip-ruby @skip-typescript @skip-validation @team:DataDog/monitor-app
Scenario: Update a downtime returns "Bad Request" response
Given there is a valid "downtime_v2" in the system
And operation "UpdateDowntime" enabled
And new "UpdateDowntime" request
And request contains "downtime_id" parameter from "downtime_v2.data.id"
And body with value {"data": {"attributes": {"invalid_field": "sophon"}, "id": "{{ downtime_v2.data.id }}", "type": "downtime"}}
Expand All @@ -137,7 +123,6 @@ Feature: Downtimes
@skip-validation @team:DataDog/monitor-app
Scenario: Update a downtime returns "Downtime not found" response
Given new "UpdateDowntime" request
And operation "UpdateDowntime" enabled
And request contains "downtime_id" parameter with value "00000000-0000-1234-0000-000000000000"
And body with value {"data": {"attributes": {"message": "test msg"}, "id": "00000000-0000-1234-0000-000000000000", "type": "downtime"}}
When the request is sent
Expand All @@ -146,7 +131,6 @@ Feature: Downtimes
@team:DataDog/monitor-app
Scenario: Update a downtime returns "OK" response
Given there is a valid "downtime_v2" in the system
And operation "UpdateDowntime" enabled
And new "UpdateDowntime" request
And request contains "downtime_id" parameter from "downtime_v2.data.id"
And body with value {"data": {"attributes": {"message": "light speed"}, "id": "{{ downtime_v2.data.id }}", "type": "downtime"}}
Expand Down