Skip to content

Commit f65aa75

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 393eda14 of spec repo
1 parent 40afa91 commit f65aa75

13 files changed

+115
-46
lines changed

.apigentools-info

+4-4
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": "2025-02-12 18:33:47.788334",
8-
"spec_repo_commit": "6a4cfb82"
7+
"regenerated": "2025-02-13 17:04:01.282746",
8+
"spec_repo_commit": "393eda14"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-02-12 18:33:47.802844",
13-
"spec_repo_commit": "6a4cfb82"
12+
"regenerated": "2025-02-13 17:04:01.301910",
13+
"spec_repo_commit": "393eda14"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+11-14
Original file line numberDiff line numberDiff line change
@@ -3741,7 +3741,7 @@ components:
37413741
properties:
37423742
attributes:
37433743
additionalProperties: {}
3744-
description: JSON object of attributes from CI Visibility test events.
3744+
description: JSON object of attributes from Test Optimization test events.
37453745
example:
37463746
customAttribute: 123
37473747
duration: 2345
@@ -35086,8 +35086,8 @@ paths:
3508635086
- ci_visibility_read
3508735087
/api/v2/ci/tests/analytics/aggregate:
3508835088
post:
35089-
description: The API endpoint to aggregate CI Visibility test events into buckets
35090-
of computed metrics and timeseries.
35089+
description: The API endpoint to aggregate test events into buckets of computed
35090+
metrics and timeseries.
3509135091
operationId: AggregateCIAppTestEvents
3509235092
requestBody:
3509335093
content:
@@ -35115,16 +35115,15 @@ paths:
3511535115
- ci_visibility_read
3511635116
summary: Aggregate tests events
3511735117
tags:
35118-
- CI Visibility Tests
35118+
- Test Optimization
3511935119
x-codegen-request-body-name: body
3512035120
x-permission:
3512135121
operator: OR
3512235122
permissions:
3512335123
- ci_visibility_read
3512435124
/api/v2/ci/tests/events:
3512535125
get:
35126-
description: 'List endpoint returns CI Visibility test events that match a [search
35127-
query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
35126+
description: 'List endpoint returns test events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
3512835127

3512935128
[Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).
3513035129

@@ -35199,7 +35198,7 @@ paths:
3519935198
- ci_visibility_read
3520035199
summary: Get a list of tests events
3520135200
tags:
35202-
- CI Visibility Tests
35201+
- Test Optimization
3520335202
x-pagination:
3520435203
cursorParam: page[cursor]
3520535204
cursorPath: meta.page.after
@@ -35211,8 +35210,7 @@ paths:
3521135210
- ci_visibility_read
3521235211
/api/v2/ci/tests/events/search:
3521335212
post:
35214-
description: 'List endpoint returns CI Visibility test events that match a [search
35215-
query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
35213+
description: 'List endpoint returns test events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
3521635214

3521735215
[Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).
3521835216

@@ -35245,7 +35243,7 @@ paths:
3524535243
- ci_visibility_read
3524635244
summary: Search tests events
3524735245
tags:
35248-
- CI Visibility Tests
35246+
- Test Optimization
3524935247
x-codegen-request-body-name: body
3525035248
x-pagination:
3525135249
cursorParam: body.page.cursor
@@ -51224,10 +51222,6 @@ tags:
5122451222
to your Datadog site over HTTP. See the [CI Pipeline Visibility in Datadog page](https://docs.datadoghq.com/continuous_integration/pipelines/)
5122551223
for more information.
5122651224
name: CI Visibility Pipelines
51227-
- description: Search or aggregate your CI Visibility test events over HTTP. See the
51228-
[Test Visibility in Datadog page](https://docs.datadoghq.com/tests/) for more
51229-
information.
51230-
name: CI Visibility Tests
5123151225
- description: 'Datadog Cloud Security Management (CSM) delivers real-time threat
5123251226
detection
5123351227

@@ -51574,6 +51568,9 @@ tags:
5157451568
- description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/)
5157551569
for more information.
5157651570
name: Teams
51571+
- description: Search or aggregate your test events over HTTP. See the [Test Optimization
51572+
in Datadog](https://docs.datadoghq.com/tests/) page for more information.
51573+
name: Test Optimization
5157751574
- description: 'The usage metering API allows you to get hourly, daily, and
5157851575

5157951576
monthly usage across multiple facets of Datadog.

docs/datadog_api_client.v2.api.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,6 @@ datadog\_api\_client.v2.api.ci\_visibility\_pipelines\_api module
8181
:members:
8282
:show-inheritance:
8383

84-
datadog\_api\_client.v2.api.ci\_visibility\_tests\_api module
85-
-------------------------------------------------------------
86-
87-
.. automodule:: datadog_api_client.v2.api.ci_visibility_tests_api
88-
:members:
89-
:show-inheritance:
90-
9184
datadog\_api\_client.v2.api.cloud\_cost\_management\_api module
9285
---------------------------------------------------------------
9386

@@ -431,6 +424,13 @@ datadog\_api\_client.v2.api.teams\_api module
431424
:members:
432425
:show-inheritance:
433426

427+
datadog\_api\_client.v2.api.test\_optimization\_api module
428+
----------------------------------------------------------
429+
430+
.. automodule:: datadog_api_client.v2.api.test_optimization_api
431+
:members:
432+
:show-inheritance:
433+
434434
datadog\_api\_client.v2.api.usage\_metering\_api module
435435
-------------------------------------------------------
436436

examples/v2/ci-visibility-tests/AggregateCIAppTestEvents.py renamed to examples/v2/test-optimization/AggregateCIAppTestEvents.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
from datadog_api_client import ApiClient, Configuration
6-
from datadog_api_client.v2.api.ci_visibility_tests_api import CIVisibilityTestsApi
6+
from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi
77
from datadog_api_client.v2.model.ci_app_aggregate_sort import CIAppAggregateSort
88
from datadog_api_client.v2.model.ci_app_aggregation_function import CIAppAggregationFunction
99
from datadog_api_client.v2.model.ci_app_compute import CIAppCompute
@@ -44,7 +44,7 @@
4444

4545
configuration = Configuration()
4646
with ApiClient(configuration) as api_client:
47-
api_instance = CIVisibilityTestsApi(api_client)
47+
api_instance = TestOptimizationApi(api_client)
4848
response = api_instance.aggregate_ci_app_test_events(body=body)
4949

5050
print(response)

examples/v2/ci-visibility-tests/ListCIAppTestEvents.py renamed to examples/v2/test-optimization/ListCIAppTestEvents.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
from datetime import datetime
66
from dateutil.relativedelta import relativedelta
77
from datadog_api_client import ApiClient, Configuration
8-
from datadog_api_client.v2.api.ci_visibility_tests_api import CIVisibilityTestsApi
8+
from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi
99

1010
configuration = Configuration()
1111
with ApiClient(configuration) as api_client:
12-
api_instance = CIVisibilityTestsApi(api_client)
12+
api_instance = TestOptimizationApi(api_client)
1313
response = api_instance.list_ci_app_test_events(
1414
filter_query="@test.service:web-ui-tests",
1515
filter_from=(datetime.now() + relativedelta(seconds=-30)),

examples/v2/ci-visibility-tests/ListCIAppTestEvents_3852605281.py renamed to examples/v2/test-optimization/ListCIAppTestEvents_3852605281.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
from datetime import datetime
66
from dateutil.relativedelta import relativedelta
77
from datadog_api_client import ApiClient, Configuration
8-
from datadog_api_client.v2.api.ci_visibility_tests_api import CIVisibilityTestsApi
8+
from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi
99

1010
configuration = Configuration()
1111
with ApiClient(configuration) as api_client:
12-
api_instance = CIVisibilityTestsApi(api_client)
12+
api_instance = TestOptimizationApi(api_client)
1313
items = api_instance.list_ci_app_test_events_with_pagination(
1414
filter_from=(datetime.now() + relativedelta(seconds=-30)),
1515
filter_to=datetime.now(),

examples/v2/ci-visibility-tests/SearchCIAppTestEvents.py renamed to examples/v2/test-optimization/SearchCIAppTestEvents.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
from datadog_api_client import ApiClient, Configuration
6-
from datadog_api_client.v2.api.ci_visibility_tests_api import CIVisibilityTestsApi
6+
from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi
77
from datadog_api_client.v2.model.ci_app_query_options import CIAppQueryOptions
88
from datadog_api_client.v2.model.ci_app_query_page_options import CIAppQueryPageOptions
99
from datadog_api_client.v2.model.ci_app_sort import CIAppSort
@@ -27,7 +27,7 @@
2727

2828
configuration = Configuration()
2929
with ApiClient(configuration) as api_client:
30-
api_instance = CIVisibilityTestsApi(api_client)
30+
api_instance = TestOptimizationApi(api_client)
3131
response = api_instance.search_ci_app_test_events(body=body)
3232

3333
print(response)

examples/v2/ci-visibility-tests/SearchCIAppTestEvents_1675695429.py renamed to examples/v2/test-optimization/SearchCIAppTestEvents_1675695429.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
from datadog_api_client import ApiClient, Configuration
6-
from datadog_api_client.v2.api.ci_visibility_tests_api import CIVisibilityTestsApi
6+
from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi
77
from datadog_api_client.v2.model.ci_app_query_page_options import CIAppQueryPageOptions
88
from datadog_api_client.v2.model.ci_app_sort import CIAppSort
99
from datadog_api_client.v2.model.ci_app_test_events_request import CIAppTestEventsRequest
@@ -23,7 +23,7 @@
2323

2424
configuration = Configuration()
2525
with ApiClient(configuration) as api_client:
26-
api_instance = CIVisibilityTestsApi(api_client)
26+
api_instance = TestOptimizationApi(api_client)
2727
items = api_instance.search_ci_app_test_events_with_pagination(body=body)
2828
for item in items:
2929
print(item)

src/datadog_api_client/v2/api/ci_visibility_tests_api.py renamed to src/datadog_api_client/v2/api/test_optimization_api.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
from datadog_api_client.v2.model.ci_app_test_events_request import CIAppTestEventsRequest
2424

2525

26-
class CIVisibilityTestsApi:
26+
class TestOptimizationApi:
2727
"""
28-
Search or aggregate your CI Visibility test events over HTTP. See the `Test Visibility in Datadog page <https://docs.datadoghq.com/tests/>`_ for more information.
28+
Search or aggregate your test events over HTTP. See the `Test Optimization in Datadog <https://docs.datadoghq.com/tests/>`_ page for more information.
2929
"""
3030

3131
def __init__(self, api_client=None):
@@ -128,7 +128,7 @@ def aggregate_ci_app_test_events(
128128
) -> CIAppTestsAnalyticsAggregateResponse:
129129
"""Aggregate tests events.
130130
131-
The API endpoint to aggregate CI Visibility test events into buckets of computed metrics and timeseries.
131+
The API endpoint to aggregate test events into buckets of computed metrics and timeseries.
132132
133133
:type body: CIAppTestsAggregateRequest
134134
:rtype: CIAppTestsAnalyticsAggregateResponse
@@ -150,7 +150,7 @@ def list_ci_app_test_events(
150150
) -> CIAppTestEventsResponse:
151151
"""Get a list of tests events.
152152
153-
List endpoint returns CI Visibility test events that match a `search query <https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>`_.
153+
List endpoint returns test events that match a `search query <https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>`_.
154154
`Results are paginated similarly to logs <https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination>`_.
155155
156156
Use this endpoint to see your latest test events.
@@ -259,7 +259,7 @@ def search_ci_app_test_events(
259259
) -> CIAppTestEventsResponse:
260260
"""Search tests events.
261261
262-
List endpoint returns CI Visibility test events that match a `search query <https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>`_.
262+
List endpoint returns test events that match a `search query <https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/>`_.
263263
`Results are paginated similarly to logs <https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination>`_.
264264
265265
Use this endpoint to build complex events filtering and search.

src/datadog_api_client/v2/apis/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from datadog_api_client.v2.api.audit_api import AuditApi
99
from datadog_api_client.v2.api.authn_mappings_api import AuthNMappingsApi
1010
from datadog_api_client.v2.api.ci_visibility_pipelines_api import CIVisibilityPipelinesApi
11-
from datadog_api_client.v2.api.ci_visibility_tests_api import CIVisibilityTestsApi
1211
from datadog_api_client.v2.api.csm_agents_api import CSMAgentsApi
1312
from datadog_api_client.v2.api.csm_coverage_analysis_api import CSMCoverageAnalysisApi
1413
from datadog_api_client.v2.api.csm_threats_api import CSMThreatsApi
@@ -59,6 +58,7 @@
5958
from datadog_api_client.v2.api.spans_metrics_api import SpansMetricsApi
6059
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi
6160
from datadog_api_client.v2.api.teams_api import TeamsApi
61+
from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi
6262
from datadog_api_client.v2.api.usage_metering_api import UsageMeteringApi
6363
from datadog_api_client.v2.api.users_api import UsersApi
6464
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi
@@ -75,7 +75,6 @@
7575
"AuditApi",
7676
"AuthNMappingsApi",
7777
"CIVisibilityPipelinesApi",
78-
"CIVisibilityTestsApi",
7978
"CSMAgentsApi",
8079
"CSMCoverageAnalysisApi",
8180
"CSMThreatsApi",
@@ -126,6 +125,7 @@
126125
"SpansMetricsApi",
127126
"SyntheticsApi",
128127
"TeamsApi",
128+
"TestOptimizationApi",
129129
"UsageMeteringApi",
130130
"UsersApi",
131131
"WorkflowAutomationApi",

src/datadog_api_client/v2/model/ci_app_event_attributes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __init__(
6565
"""
6666
JSON object containing all event attributes and their associated values.
6767
68-
:param attributes: JSON object of attributes from CI Visibility test events.
68+
:param attributes: JSON object of attributes from Test Optimization test events.
6969
:type attributes: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional
7070
7171
:param tags: Array of tags associated with your event.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
@endpoint(test-optimization) @endpoint(test-optimization-v2)
2+
Feature: Test Optimization
3+
Search or aggregate your test events over HTTP. See the [Test Optimization
4+
in Datadog](https://docs.datadoghq.com/tests/) page for more information.
5+
6+
Background:
7+
Given a valid "apiKeyAuth" key in the system
8+
And a valid "appKeyAuth" key in the system
9+
And an instance of "TestOptimization" API
10+
11+
@generated @skip @team:Datadog/ci-app-backend
12+
Scenario: Aggregate tests events returns "Bad Request" response
13+
Given new "AggregateCIAppTestEvents" request
14+
And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@test.service:web-ui-tests AND @test.status:fail", "to": "now"}, "group_by": [{"facet": "@test.service", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}}
15+
When the request is sent
16+
Then the response status is 400 Bad Request
17+
18+
@team:Datadog/ci-app-backend
19+
Scenario: Aggregate tests events returns "OK" response
20+
Given new "AggregateCIAppTestEvents" request
21+
And body with value {"compute": [{"aggregation": "count", "metric": "@test.is_flaky", "type": "total"}], "filter": {"from": "now-15m", "query": "@language:(python OR go)", "to": "now"}, "group_by": [{"facet": "@git.branch", "limit": 10, "sort": {"order": "asc"}, "total": false}], "options": {"timezone": "GMT"}}
22+
When the request is sent
23+
Then the response status is 200 OK
24+
And the response "meta.status" is equal to "done"
25+
26+
@generated @skip @team:Datadog/ci-app-backend
27+
Scenario: Get a list of tests events returns "Bad Request" response
28+
Given new "ListCIAppTestEvents" request
29+
When the request is sent
30+
Then the response status is 400 Bad Request
31+
32+
@team:Datadog/ci-app-backend
33+
Scenario: Get a list of tests events returns "OK" response
34+
Given new "ListCIAppTestEvents" request
35+
And request contains "filter[query]" parameter with value "@test.service:web-ui-tests"
36+
And request contains "filter[from]" parameter with value "{{ timeISO('now - 30s') }}"
37+
And request contains "filter[to]" parameter with value "{{ timeISO('now') }}"
38+
And request contains "page[limit]" parameter with value 5
39+
When the request is sent
40+
Then the response status is 200 OK
41+
42+
@replay-only @skip-validation @team:Datadog/ci-app-backend @with-pagination
43+
Scenario: Get a list of tests events returns "OK" response with pagination
44+
Given new "ListCIAppTestEvents" request
45+
And request contains "filter[from]" parameter with value "{{ timeISO('now - 30s') }}"
46+
And request contains "filter[to]" parameter with value "{{ timeISO('now') }}"
47+
And request contains "page[limit]" parameter with value 2
48+
When the request with pagination is sent
49+
Then the response status is 200 OK
50+
And the response has 2 items
51+
52+
@generated @skip @team:Datadog/ci-app-backend
53+
Scenario: Search tests events returns "Bad Request" response
54+
Given new "SearchCIAppTestEvents" request
55+
And body with value {"filter": {"from": "now-15m", "query": "@test.service:web-ui-tests AND @test.status:fail", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"}
56+
When the request is sent
57+
Then the response status is 400 Bad Request
58+
59+
@team:Datadog/ci-app-backend
60+
Scenario: Search tests events returns "OK" response
61+
Given new "SearchCIAppTestEvents" request
62+
And body with value {"filter": {"from": "now-15m", "query": "@test.service:web-ui-tests AND @test.status:skip", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 25}, "sort": "timestamp"}
63+
When the request is sent
64+
Then the response status is 200 OK
65+
66+
@replay-only @skip-validation @team:Datadog/ci-app-backend @with-pagination
67+
Scenario: Search tests events returns "OK" response with pagination
68+
Given new "SearchCIAppTestEvents" request
69+
And body with value {"filter": {"from": "now-15m", "query": "@test.status:pass AND -@language:python", "to": "now"}, "page": {"limit": 2}, "sort": "timestamp"}
70+
When the request with pagination is sent
71+
Then the response status is 200 OK
72+
And the response has 2 items

tests/v2/features/undo.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -453,19 +453,19 @@
453453
}
454454
},
455455
"AggregateCIAppTestEvents": {
456-
"tag": "CI Visibility Tests",
456+
"tag": "Test Optimization",
457457
"undo": {
458458
"type": "safe"
459459
}
460460
},
461461
"ListCIAppTestEvents": {
462-
"tag": "CI Visibility Tests",
462+
"tag": "Test Optimization",
463463
"undo": {
464464
"type": "safe"
465465
}
466466
},
467467
"SearchCIAppTestEvents": {
468-
"tag": "CI Visibility Tests",
468+
"tag": "Test Optimization",
469469
"undo": {
470470
"type": "safe"
471471
}

0 commit comments

Comments
 (0)