diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 07cf64fab0..6606535523 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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: diff --git a/examples/v2/apm/GetServiceList.py b/examples/v2/apm/GetServiceList.py index 5ce96c49c2..00b58d1e33 100644 --- a/examples/v2/apm/GetServiceList.py +++ b/examples/v2/apm/GetServiceList.py @@ -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) diff --git a/src/datadog_api_client/v2/api/apm_api.py b/src/datadog_api_client/v2/api/apm_api.py index 51b073865e..6c20426af5 100644 --- a/src/datadog_api_client/v2/api/apm_api.py +++ b/src/datadog_api_client/v2/api/apm_api.py @@ -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"], }, @@ -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) diff --git a/tests/v2/features/apm.feature b/tests/v2/features/apm.feature index e35bd4d475..c286ba4f8b 100644 --- a/tests/v2/features/apm.feature +++ b/tests/v2/features/apm.feature @@ -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