Skip to content

Commit 072e71e

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add mandatory filter env parameter to APM services endpoint (#3184)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent c416a25 commit 072e71e

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71059,6 +71059,14 @@ paths:
7105971059
/api/v2/apm/services:
7106071060
get:
7106171061
operationId: GetServiceList
71062+
parameters:
71063+
- description: Filter services by environment. Can be set to `*` to return all
71064+
services across all environments.
71065+
in: query
71066+
name: filter[env]
71067+
required: true
71068+
schema:
71069+
type: string
7106271070
responses:
7106371071
'200':
7106471072
content:

examples/v2/apm/GetServiceList.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
configuration = Configuration()
99
with ApiClient(configuration) as api_client:
1010
api_instance = APMApi(api_client)
11-
response = api_instance.get_service_list()
11+
response = api_instance.get_service_list(
12+
filter_env="filter[env]",
13+
)
1214

1315
print(response)

src/datadog_api_client/v2/api/apm_api.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ def __init__(self, api_client=None):
2929
"http_method": "GET",
3030
"version": "v2",
3131
},
32-
params_map={},
32+
params_map={
33+
"filter_env": {
34+
"required": True,
35+
"openapi_types": (str,),
36+
"attribute": "filter[env]",
37+
"location": "query",
38+
},
39+
},
3340
headers_map={
3441
"accept": ["application/json"],
3542
},
@@ -38,10 +45,15 @@ def __init__(self, api_client=None):
3845

3946
def get_service_list(
4047
self,
48+
filter_env: str,
4149
) -> ServiceList:
4250
"""Get service list.
4351
52+
:param filter_env: Filter services by environment. Can be set to ``*`` to return all services across all environments.
53+
:type filter_env: str
4454
:rtype: ServiceList
4555
"""
4656
kwargs: Dict[str, Any] = {}
57+
kwargs["filter_env"] = filter_env
58+
4759
return self._get_service_list_endpoint.call_with_http_info(**kwargs)

tests/v2/features/apm.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ Feature: APM
99
And a valid "appKeyAuth" key in the system
1010
And an instance of "APM" API
1111
And new "GetServiceList" request
12+
And request contains "filter[env]" parameter from "REPLACE.ME"
1213
When the request is sent
1314
Then the response status is 200 OK

0 commit comments

Comments
 (0)