Skip to content

Commit

Permalink
Remove unstable flag for Events v2 api (#1791)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec committed Dec 6, 2023
1 parent 227b857 commit 73681a2
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 31 deletions.
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.6",
"regenerated": "2023-12-05 19:41:02.582570",
"spec_repo_commit": "334a5ac9"
"regenerated": "2023-12-06 19:01:07.914988",
"spec_repo_commit": "6ccf2a1f"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-12-05 19:41:02.608203",
"spec_repo_commit": "334a5ac9"
"regenerated": "2023-12-06 19:01:07.938963",
"spec_repo_commit": "6ccf2a1f"
}
}
}
6 changes: 0 additions & 6 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22325,9 +22325,6 @@ paths:
cursorPath: meta.page.after
limitParam: page[limit]
resultsPath: data
x-unstable: '**Note**: This endpoint is in beta.

For access, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/events/search:
post:
description: 'List endpoint returns events that match an events search query.
Expand Down Expand Up @@ -22370,9 +22367,6 @@ paths:
cursorPath: meta.page.after
limitParam: body.page.limit
resultsPath: data
x-unstable: '**Note**: This endpoint is in beta.

For access, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/incidents:
get:
description: Get all incidents for the user's organization.
Expand Down
1 change: 0 additions & 1 deletion examples/v2/events/ListEvents.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from datadog_api_client.v2.api.events_api import EventsApi

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

configuration = Configuration()
configuration.unstable_operations["list_events"] = True
with ApiClient(configuration) as api_client:
api_instance = EventsApi(api_client)
items = api_instance.list_events_with_pagination(
Expand Down
1 change: 0 additions & 1 deletion examples/v2/events/ListEvents_2663715109.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from datadog_api_client.v2.api.events_api import EventsApi

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

configuration = Configuration()
configuration.unstable_operations["search_events"] = True
with ApiClient(configuration) as api_client:
api_instance = EventsApi(api_client)
response = api_instance.search_events(body=body)
Expand Down
1 change: 0 additions & 1 deletion examples/v2/events/SearchEvents_3856995058.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
)

configuration = Configuration()
configuration.unstable_operations["search_events"] = True
with ApiClient(configuration) as api_client:
api_instance = EventsApi(api_client)
items = api_instance.search_events_with_pagination(body=body)
Expand Down
2 changes: 0 additions & 2 deletions src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,6 @@ def __init__(
"v2.get_monthly_cost_attribution": False,
"v2.create_dora_deployment": False,
"v2.create_dora_incident": False,
"v2.list_events": False,
"v2.search_events": False,
"v2.create_incident": False,
"v2.create_incident_integration": False,
"v2.create_incident_todo": False,
Expand Down
21 changes: 7 additions & 14 deletions tests/v2/features/events.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,19 @@ Feature: Events

@generated @skip @team:DataDog/event-management
Scenario: Get a list of events returns "Bad Request" response
Given operation "ListEvents" enabled
And new "ListEvents" request
Given new "ListEvents" request
When the request is sent
Then the response status is 400 Bad Request

@skip-validation @team:DataDog/event-management
Scenario: Get a list of events returns "OK" response
Given operation "ListEvents" enabled
And new "ListEvents" request
Given new "ListEvents" request
When the request is sent
Then the response status is 200 OK

@replay-only @skip-validation @team:DataDog/event-management @with-pagination
Scenario: Get a list of events returns "OK" response with pagination
Given operation "ListEvents" enabled
And new "ListEvents" request
Given new "ListEvents" request
And request contains "filter[from]" parameter with value "now-15m"
And request contains "filter[to]" parameter with value "now"
And request contains "page[limit]" parameter with value 2
Expand All @@ -37,8 +34,7 @@ Feature: Events

@team:DataDog/event-management
Scenario: Get a quick list of events returns "OK" response
Given operation "ListEvents" enabled
And new "ListEvents" request
Given new "ListEvents" request
And request contains "filter[query]" parameter with value "datadog-agent"
And request contains "filter[from]" parameter with value "2020-09-17T11:48:36+01:00"
And request contains "filter[to]" parameter with value "2020-09-17T12:48:36+01:00"
Expand All @@ -49,25 +45,22 @@ Feature: Events

@team:DataDog/event-management
Scenario: Search events returns "Bad Request" response
Given operation "SearchEvents" enabled
And new "SearchEvents" request
Given new "SearchEvents" request
And body with value {"filter": {"from": "now-15m", "query": "service:web* AND @http.status_code:[200 TO 299]", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"}
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/event-management
Scenario: Search events returns "OK" response
Given operation "SearchEvents" enabled
And new "SearchEvents" request
Given new "SearchEvents" request
And body with value {"filter": {"query": "datadog-agent", "from": "2020-09-17T11:48:36+01:00", "to": "2020-09-17T12:48:36+01:00"}, "sort": "timestamp", "page": {"limit": 5}}
When the request is sent
Then the response status is 200 OK
And the response "data" has length 0

@replay-only @skip-validation @team:DataDog/event-management @with-pagination
Scenario: Search events returns "OK" response with pagination
Given operation "SearchEvents" enabled
And new "SearchEvents" request
Given new "SearchEvents" request
And body with value {"filter": {"from": "now-15m", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 2}, "sort": "timestamp"}
When the request with pagination is sent
Then the response status is 200 OK
Expand Down

0 comments on commit 73681a2

Please sign in to comment.