@@ -36,10 +36,16 @@ export class APMApiRequestFactory extends BaseAPIRequestFactory {
3636 }
3737 }
3838 public async getServiceList (
39+ filterEnv : string ,
3940 _options ?: Configuration ,
4041 ) : Promise < RequestContext > {
4142 const _config = _options || this . configuration ;
4243
44+ // verify required parameter 'filterEnv' is not null or undefined
45+ if ( filterEnv === null || filterEnv === undefined ) {
46+ throw new RequiredError ( "filterEnv" , "getServiceList" ) ;
47+ }
48+
4349 // Path Params
4450 const localVarPath = "/api/v2/apm/services" ;
4551
@@ -61,6 +67,15 @@ export class APMApiRequestFactory extends BaseAPIRequestFactory {
6167 requestContext . setHeaderParam ( "User-Agent" , this . userAgent ) ;
6268 }
6369
70+ // Query Params
71+ if ( filterEnv !== undefined ) {
72+ requestContext . setQueryParam (
73+ "filter[env]" ,
74+ serialize ( filterEnv , TypingInfo , "string" , "" ) ,
75+ "" ,
76+ ) ;
77+ }
78+
6479 // Apply auth methods
6580 applySecurityAuthentication ( _config , requestContext , [
6681 "apiKeyAuth" ,
@@ -128,6 +143,14 @@ export class APMApiResponseProcessor {
128143 }
129144}
130145
146+ export interface APMApiGetServiceListRequest {
147+ /**
148+ * Filter services by environment. Can be set to `*` to return all services across all environments.
149+ * @type string
150+ */
151+ filterEnv : string ;
152+ }
153+
131154export class APMApi {
132155 private requestFactory : APMApiRequestFactory ;
133156 private responseProcessor : APMApiResponseProcessor ;
@@ -149,8 +172,14 @@ export class APMApi {
149172 /**
150173 * @param param The request object
151174 */
152- public getServiceList ( options ?: Configuration ) : Promise < ServiceList > {
153- const requestContextPromise = this . requestFactory . getServiceList ( options ) ;
175+ public getServiceList (
176+ param : APMApiGetServiceListRequest ,
177+ options ?: Configuration ,
178+ ) : Promise < ServiceList > {
179+ const requestContextPromise = this . requestFactory . getServiceList (
180+ param . filterEnv ,
181+ options ,
182+ ) ;
154183 return requestContextPromise . then ( ( requestContext ) => {
155184 return this . configuration . httpApi
156185 . send ( requestContext )
0 commit comments