Skip to content
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: 8 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71059,6 +71059,14 @@ paths:
/api/v2/apm/services:
get:
operationId: GetServiceList
parameters:
- description: Filter services by environment. Can be set to `*` to return all
services across all environments.
in: query
name: filter[env]
required: true
schema:
type: string
responses:
'200':
content:
Expand Down
4 changes: 3 additions & 1 deletion examples/v2/apm/GetServiceList.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = APMApi(api_client)
response = api_instance.get_service_list()
response = api_instance.get_service_list(
filter_env="filter[env]",
)

print(response)
14 changes: 13 additions & 1 deletion src/datadog_api_client/v2/api/apm_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ def __init__(self, api_client=None):
"http_method": "GET",
"version": "v2",
},
params_map={},
params_map={
"filter_env": {
"required": True,
"openapi_types": (str,),
"attribute": "filter[env]",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
},
Expand All @@ -38,10 +45,15 @@ def __init__(self, api_client=None):

def get_service_list(
self,
filter_env: str,
) -> ServiceList:
"""Get service list.

:param filter_env: Filter services by environment. Can be set to ``*`` to return all services across all environments.
:type filter_env: str
:rtype: ServiceList
"""
kwargs: Dict[str, Any] = {}
kwargs["filter_env"] = filter_env

return self._get_service_list_endpoint.call_with_http_info(**kwargs)
1 change: 1 addition & 0 deletions tests/v2/features/apm.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Feature: APM
And a valid "appKeyAuth" key in the system
And an instance of "APM" API
And new "GetServiceList" request
And request contains "filter[env]" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK