Skip to content

Commit 8e6f7ee

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Remove unstable flag for Events v2 api (#1441)
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>
1 parent 4a460d6 commit 8e6f7ee

File tree

10 files changed

+11
-41
lines changed

10 files changed

+11
-41
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2023-12-05 19:40:54.538351",
8-
"spec_repo_commit": "334a5ac9"
7+
"regenerated": "2023-12-06 19:00:54.053567",
8+
"spec_repo_commit": "6ccf2a1f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-12-05 19:40:54.553987",
13-
"spec_repo_commit": "334a5ac9"
12+
"regenerated": "2023-12-06 19:00:54.068598",
13+
"spec_repo_commit": "6ccf2a1f"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22325,9 +22325,6 @@ paths:
2232522325
cursorPath: meta.page.after
2232622326
limitParam: page[limit]
2232722327
resultsPath: data
22328-
x-unstable: '**Note**: This endpoint is in beta.
22329-
22330-
For access, contact [Datadog support](https://docs.datadoghq.com/help/).'
2233122328
/api/v2/events/search:
2233222329
post:
2233322330
description: 'List endpoint returns events that match an events search query.
@@ -22370,9 +22367,6 @@ paths:
2237022367
cursorPath: meta.page.after
2237122368
limitParam: body.page.limit
2237222369
resultsPath: data
22373-
x-unstable: '**Note**: This endpoint is in beta.
22374-
22375-
For access, contact [Datadog support](https://docs.datadoghq.com/help/).'
2237622370
/api/v2/incidents:
2237722371
get:
2237822372
description: Get all incidents for the user's organization.

examples/v2/events/ListEvents.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
8-
configuration.unstableOperations["v2.listEvents"] = true;
98
const apiInstance = new v2.EventsApi(configuration);
109

1110
apiInstance

examples/v2/events/ListEvents_1527584014.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
8-
configuration.unstableOperations["v2.listEvents"] = true;
98
const apiInstance = new v2.EventsApi(configuration);
109

1110
const params: v2.EventsApiListEventsRequest = {

examples/v2/events/ListEvents_2663715109.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
8-
configuration.unstableOperations["v2.listEvents"] = true;
98
const apiInstance = new v2.EventsApi(configuration);
109

1110
const params: v2.EventsApiListEventsRequest = {

examples/v2/events/SearchEvents.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
8-
configuration.unstableOperations["v2.searchEvents"] = true;
98
const apiInstance = new v2.EventsApi(configuration);
109

1110
const params: v2.EventsApiSearchEventsRequest = {

examples/v2/events/SearchEvents_3856995058.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
8-
configuration.unstableOperations["v2.searchEvents"] = true;
98
const apiInstance = new v2.EventsApi(configuration);
109

1110
const params: v2.EventsApiSearchEventsRequest = {

features/v2/events.feature

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,19 @@ Feature: Events
1212

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

2019
@skip-validation @team:DataDog/event-management
2120
Scenario: Get a list of events returns "OK" response
22-
Given operation "ListEvents" enabled
23-
And new "ListEvents" request
21+
Given new "ListEvents" request
2422
When the request is sent
2523
Then the response status is 200 OK
2624

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

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

5046
@team:DataDog/event-management
5147
Scenario: Search events returns "Bad Request" response
52-
Given operation "SearchEvents" enabled
53-
And new "SearchEvents" request
48+
Given new "SearchEvents" request
5449
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"}
5550
When the request is sent
5651
Then the response status is 400 Bad Request
5752

5853
@team:DataDog/event-management
5954
Scenario: Search events returns "OK" response
60-
Given operation "SearchEvents" enabled
61-
And new "SearchEvents" request
55+
Given new "SearchEvents" request
6256
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}}
6357
When the request is sent
6458
Then the response status is 200 OK
6559
And the response "data" has length 0
6660

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

packages/datadog-api-client-common/configuration.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,6 @@ export function createConfiguration(
219219
"v2.getMonthlyCostAttribution": false,
220220
"v2.createDORADeployment": false,
221221
"v2.createDORAIncident": false,
222-
"v2.listEvents": false,
223-
"v2.searchEvents": false,
224222
"v2.createIncident": false,
225223
"v2.createIncidentIntegration": false,
226224
"v2.createIncidentTodo": false,

packages/datadog-api-client-v2/apis/EventsApi.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ export class EventsApiRequestFactory extends BaseAPIRequestFactory {
3232
): Promise<RequestContext> {
3333
const _config = _options || this.configuration;
3434

35-
logger.warn("Using unstable operation 'listEvents'");
36-
if (!_config.unstableOperations["v2.listEvents"]) {
37-
throw new Error("Unstable operation 'listEvents' is disabled");
38-
}
39-
4035
// Path Params
4136
const localVarPath = "/api/v2/events";
4237

@@ -101,11 +96,6 @@ export class EventsApiRequestFactory extends BaseAPIRequestFactory {
10196
): Promise<RequestContext> {
10297
const _config = _options || this.configuration;
10398

104-
logger.warn("Using unstable operation 'searchEvents'");
105-
if (!_config.unstableOperations["v2.searchEvents"]) {
106-
throw new Error("Unstable operation 'searchEvents' is disabled");
107-
}
108-
10999
// Path Params
110100
const localVarPath = "/api/v2/events/search";
111101

0 commit comments

Comments
 (0)