Class: LaunchDarklyApi::FeatureFlagsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/launchdarkly_api/api/feature_flags_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ FeatureFlagsApi

Returns a new instance of FeatureFlagsApi.



19
20
21
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#copy_feature_flag(project_key, feature_flag_key, feature_flag_copy_body, opts = {}) ⇒ FeatureFlag

Copies the feature flag configuration from one environment to the same feature flag in another environment.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag's key. The key identifies the flag in your code.

  • feature_flag_copy_body

    Copy feature flag configurations between environments.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



28
29
30
31
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 28

def copy_feature_flag(project_key, feature_flag_key, feature_flag_copy_body, opts = {})
  data, _status_code, _headers = copy_feature_flag_with_http_info(project_key, feature_flag_key, feature_flag_copy_body, opts)
  data
end

#copy_feature_flag_with_http_info(project_key, feature_flag_key, feature_flag_copy_body, opts = {}) ⇒ Array<(FeatureFlag, Fixnum, Hash)>

Copies the feature flag configuration from one environment to the same feature flag in another environment.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • feature_flag_copy_body

    Copy feature flag configurations between environments.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FeatureFlag, Fixnum, Hash)>)

    FeatureFlag data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 39

def copy_feature_flag_with_http_info(project_key, feature_flag_key, feature_flag_copy_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.copy_feature_flag ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.copy_feature_flag"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.copy_feature_flag"
  end
  # verify the required parameter 'feature_flag_copy_body' is set
  if @api_client.config.client_side_validation && feature_flag_copy_body.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_copy_body' when calling FeatureFlagsApi.copy_feature_flag"
  end
  # resource path
  local_var_path = '/flags/{projectKey}/{featureFlagKey}/copy'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(feature_flag_copy_body)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlag')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#copy_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_approval_request(project_key, environment_key, feature_flag_key, approval_request_id, opts = {}) ⇒ nil

Delete an approval request for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • approval_request_id

    The approval request ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


94
95
96
97
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 94

def delete_approval_request(project_key, environment_key, feature_flag_key, approval_request_id, opts = {})
  delete_approval_request_with_http_info(project_key, environment_key, feature_flag_key, approval_request_id, opts)
  nil
end

#delete_approval_request_with_http_info(project_key, environment_key, feature_flag_key, approval_request_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete an approval request for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • approval_request_id

    The approval request ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 107

def delete_approval_request_with_http_info(project_key, environment_key, feature_flag_key, approval_request_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.delete_approval_request ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.delete_approval_request"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.delete_approval_request"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.delete_approval_request"
  end
  # verify the required parameter 'approval_request_id' is set
  if @api_client.config.client_side_validation && approval_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'approval_request_id' when calling FeatureFlagsApi.delete_approval_request"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'approvalRequestId' + '}', approval_request_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'approval_request_config_body'])
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#delete_approval_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_feature_flag(project_key, feature_flag_key, opts = {}) ⇒ nil

Delete a feature flag in all environments. Be careful– only delete feature flags that are no longer being used by your application.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


162
163
164
165
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 162

def delete_feature_flag(project_key, feature_flag_key, opts = {})
  delete_feature_flag_with_http_info(project_key, feature_flag_key, opts)
  nil
end

#delete_feature_flag_with_http_info(project_key, feature_flag_key, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a feature flag in all environments. Be careful– only delete feature flags that are no longer being used by your application.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 172

def delete_feature_flag_with_http_info(project_key, feature_flag_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.delete_feature_flag ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.delete_feature_flag"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.delete_feature_flag"
  end
  # resource path
  local_var_path = '/flags/{projectKey}/{featureFlagKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#delete_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, scheduled_change_id, opts = {}) ⇒ nil

Delete a scheduled change on a feature flag in an environment.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • scheduled_change_id

    The id of the scheduled change

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


221
222
223
224
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 221

def delete_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, scheduled_change_id, opts = {})
  delete_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, scheduled_change_id, opts)
  nil
end

#delete_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, scheduled_change_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a scheduled change on a feature flag in an environment.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • scheduled_change_id

    The id of the scheduled change

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 233

def delete_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, scheduled_change_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.delete_flag_config_scheduled_changes ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.delete_flag_config_scheduled_changes"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.delete_flag_config_scheduled_changes"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.delete_flag_config_scheduled_changes"
  end
  # verify the required parameter 'scheduled_change_id' is set
  if @api_client.config.client_side_validation && scheduled_change_id.nil?
    fail ArgumentError, "Missing the required parameter 'scheduled_change_id' when calling FeatureFlagsApi.delete_flag_config_scheduled_changes"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'scheduledChangeId' + '}', scheduled_change_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#delete_flag_config_scheduled_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_approval_request(project_key, feature_flag_key, environment_key, approval_request_id, opts = {}) ⇒ ApprovalRequests

Get a single approval request for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • approval_request_id

    The approval request ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



290
291
292
293
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 290

def get_approval_request(project_key, feature_flag_key, environment_key, approval_request_id, opts = {})
  data, _status_code, _headers = get_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, opts)
  data
end

#get_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, opts = {}) ⇒ Array<(ApprovalRequests, Fixnum, Hash)>

Get a single approval request for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • approval_request_id

    The approval request ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApprovalRequests, Fixnum, Hash)>)

    ApprovalRequests data, response status code and response headers



302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 302

def get_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_approval_request ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_approval_request"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_approval_request"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.get_approval_request"
  end
  # verify the required parameter 'approval_request_id' is set
  if @api_client.config.client_side_validation && approval_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'approval_request_id' when calling FeatureFlagsApi.get_approval_request"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'approvalRequestId' + '}', approval_request_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApprovalRequests')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#get_approval_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_approval_requests(project_key, feature_flag_key, environment_key, opts = {}) ⇒ ApprovalRequests

Get all approval requests for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



359
360
361
362
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 359

def get_approval_requests(project_key, feature_flag_key, environment_key, opts = {})
  data, _status_code, _headers = get_approval_requests_with_http_info(project_key, feature_flag_key, environment_key, opts)
  data
end

#get_approval_requests_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(ApprovalRequests, Fixnum, Hash)>

Get all approval requests for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApprovalRequests, Fixnum, Hash)>)

    ApprovalRequests data, response status code and response headers



370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 370

def get_approval_requests_with_http_info(project_key, feature_flag_key, environment_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_approval_requests ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_approval_requests"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_approval_requests"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.get_approval_requests"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApprovalRequests')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#get_approval_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_expiring_user_targets(project_key, environment_key, feature_flag_key, opts = {}) ⇒ UserTargetingExpirationForFlags

Get expiring user targets for feature flag

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



423
424
425
426
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 423

def get_expiring_user_targets(project_key, environment_key, feature_flag_key, opts = {})
  data, _status_code, _headers = get_expiring_user_targets_with_http_info(project_key, environment_key, feature_flag_key, opts)
  data
end

#get_expiring_user_targets_with_http_info(project_key, environment_key, feature_flag_key, opts = {}) ⇒ Array<(UserTargetingExpirationForFlags, Fixnum, Hash)>

Get expiring user targets for feature flag

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 434

def get_expiring_user_targets_with_http_info(project_key, environment_key, feature_flag_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_expiring_user_targets ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_expiring_user_targets"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.get_expiring_user_targets"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_expiring_user_targets"
  end
  # resource path
  local_var_path = '/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UserTargetingExpirationForFlags')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#get_expiring_user_targets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_feature_flag(project_key, feature_flag_key, opts = {}) ⇒ FeatureFlag

Get a single feature flag by key.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :env (Array<String>)

    By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env&#x3D; will restrict the returned configurations to just your production environment.

Returns:



487
488
489
490
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 487

def get_feature_flag(project_key, feature_flag_key, opts = {})
  data, _status_code, _headers = get_feature_flag_with_http_info(project_key, feature_flag_key, opts)
  data
end

#get_feature_flag_status(project_key, environment_key, feature_flag_key, opts = {}) ⇒ FeatureFlagStatus

Get the status for a particular feature flag.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



548
549
550
551
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 548

def get_feature_flag_status(project_key, environment_key, feature_flag_key, opts = {})
  data, _status_code, _headers = get_feature_flag_status_with_http_info(project_key, environment_key, feature_flag_key, opts)
  data
end

#get_feature_flag_status_across_environments(project_key, feature_flag_key, opts = {}) ⇒ FeatureFlagStatusAcrossEnvironments

Get the status for a particular feature flag across environments

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



611
612
613
614
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 611

def get_feature_flag_status_across_environments(project_key, feature_flag_key, opts = {})
  data, _status_code, _headers = get_feature_flag_status_across_environments_with_http_info(project_key, feature_flag_key, opts)
  data
end

#get_feature_flag_status_across_environments_with_http_info(project_key, feature_flag_key, opts = {}) ⇒ Array<(FeatureFlagStatusAcrossEnvironments, Fixnum, Hash)>

Get the status for a particular feature flag across environments

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 621

def get_feature_flag_status_across_environments_with_http_info(project_key, feature_flag_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_feature_flag_status_across_environments ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_feature_flag_status_across_environments"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_feature_flag_status_across_environments"
  end
  # resource path
  local_var_path = '/flag-status/{projectKey}/{featureFlagKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlagStatusAcrossEnvironments')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#get_feature_flag_status_across_environments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_feature_flag_status_with_http_info(project_key, environment_key, feature_flag_key, opts = {}) ⇒ Array<(FeatureFlagStatus, Fixnum, Hash)>

Get the status for a particular feature flag.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FeatureFlagStatus, Fixnum, Hash)>)

    FeatureFlagStatus data, response status code and response headers



559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 559

def get_feature_flag_status_with_http_info(project_key, environment_key, feature_flag_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_feature_flag_status ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_feature_flag_status"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.get_feature_flag_status"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_feature_flag_status"
  end
  # resource path
  local_var_path = '/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlagStatus')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#get_feature_flag_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_feature_flag_statuses(project_key, environment_key, opts = {}) ⇒ FeatureFlagStatuses

Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



669
670
671
672
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 669

def get_feature_flag_statuses(project_key, environment_key, opts = {})
  data, _status_code, _headers = get_feature_flag_statuses_with_http_info(project_key, environment_key, opts)
  data
end

#get_feature_flag_statuses_with_http_info(project_key, environment_key, opts = {}) ⇒ Array<(FeatureFlagStatuses, Fixnum, Hash)>

Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FeatureFlagStatuses, Fixnum, Hash)>)

    FeatureFlagStatuses data, response status code and response headers



679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 679

def get_feature_flag_statuses_with_http_info(project_key, environment_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_feature_flag_statuses ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_feature_flag_statuses"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.get_feature_flag_statuses"
  end
  # resource path
  local_var_path = '/flag-statuses/{projectKey}/{environmentKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlagStatuses')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#get_feature_flag_statuses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_feature_flag_with_http_info(project_key, feature_flag_key, opts = {}) ⇒ Array<(FeatureFlag, Fixnum, Hash)>

Get a single feature flag by key.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :env (Array<String>)

    By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env&#x3D; will restrict the returned configurations to just your production environment.

Returns:

  • (Array<(FeatureFlag, Fixnum, Hash)>)

    FeatureFlag data, response status code and response headers



498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 498

def get_feature_flag_with_http_info(project_key, feature_flag_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_feature_flag ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_feature_flag"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_feature_flag"
  end
  # resource path
  local_var_path = '/flags/{projectKey}/{featureFlagKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)

  # query parameters
  query_params = {}
  query_params[:'env'] = @api_client.build_collection_param(opts[:'env'], :multi) if !opts[:'env'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlag')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#get_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_feature_flags(project_key, opts = {}) ⇒ FeatureFlags

Get a list of all features in the given project.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :env (Array<String>)

    By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env&#x3D; will restrict the returned configurations to just your production environment.

  • :summary (BOOLEAN)

    By default in api version &gt;&#x3D; 1, flags will not include their list of prerequisites, targets or rules. Set summary&#x3D;0 to include these fields for each flag returned.

  • :archived (BOOLEAN)

    When set to 1, only archived flags will be included in the list of flags returned. By default, archived flags are not included in the list of flags.

  • :limit (Float)

    The number of objects to return. Defaults to -1, which returns everything.

  • :offset (Float)

    Where to start in the list. This is for use with pagination. For example, an offset of 10 would skip the first 10 items and then return the next limit items.

  • :filter (String)

    A comma-separated list of filters. Each filter is of the form field:value.

  • :sort (String)

    A comma-separated list of fields to sort by. A field prefixed by a - will be sorted in descending order.

  • :tag (String)

    Filter by tag. A tag can be used to group flags across projects.

Returns:



734
735
736
737
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 734

def get_feature_flags(project_key, opts = {})
  data, _status_code, _headers = get_feature_flags_with_http_info(project_key, opts)
  data
end

#get_feature_flags_with_http_info(project_key, opts = {}) ⇒ Array<(FeatureFlags, Fixnum, Hash)>

Get a list of all features in the given project.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :env (Array<String>)

    By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env&#x3D; will restrict the returned configurations to just your production environment.

  • :summary (BOOLEAN)

    By default in api version &gt;&#x3D; 1, flags will not include their list of prerequisites, targets or rules. Set summary&#x3D;0 to include these fields for each flag returned.

  • :archived (BOOLEAN)

    When set to 1, only archived flags will be included in the list of flags returned. By default, archived flags are not included in the list of flags.

  • :limit (Float)

    The number of objects to return. Defaults to -1, which returns everything.

  • :offset (Float)

    Where to start in the list. This is for use with pagination. For example, an offset of 10 would skip the first 10 items and then return the next limit items.

  • :filter (String)

    A comma-separated list of filters. Each filter is of the form field:value.

  • :sort (String)

    A comma-separated list of fields to sort by. A field prefixed by a - will be sorted in descending order.

  • :tag (String)

    Filter by tag. A tag can be used to group flags across projects.

Returns:

  • (Array<(FeatureFlags, Fixnum, Hash)>)

    FeatureFlags data, response status code and response headers



751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 751

def get_feature_flags_with_http_info(project_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_feature_flags ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_feature_flags"
  end
  # resource path
  local_var_path = '/flags/{projectKey}'.sub('{' + 'projectKey' + '}', project_key.to_s)

  # query parameters
  query_params = {}
  query_params[:'env'] = @api_client.build_collection_param(opts[:'env'], :multi) if !opts[:'env'].nil?
  query_params[:'summary'] = opts[:'summary'] if !opts[:'summary'].nil?
  query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlags')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#get_feature_flags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_flag_config_scheduled_change(project_key, feature_flag_key, environment_key, scheduled_change_id, opts = {}) ⇒ FeatureFlagScheduledChange

Get a scheduled change on a feature flag by id.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • scheduled_change_id

    The id of the scheduled change

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



805
806
807
808
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 805

def get_flag_config_scheduled_change(project_key, feature_flag_key, environment_key, scheduled_change_id, opts = {})
  data, _status_code, _headers = get_flag_config_scheduled_change_with_http_info(project_key, feature_flag_key, environment_key, scheduled_change_id, opts)
  data
end

#get_flag_config_scheduled_change_with_http_info(project_key, feature_flag_key, environment_key, scheduled_change_id, opts = {}) ⇒ Array<(FeatureFlagScheduledChange, Fixnum, Hash)>

Get a scheduled change on a feature flag by id.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • scheduled_change_id

    The id of the scheduled change

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FeatureFlagScheduledChange, Fixnum, Hash)>)

    FeatureFlagScheduledChange data, response status code and response headers



817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 817

def get_flag_config_scheduled_change_with_http_info(project_key, feature_flag_key, environment_key, scheduled_change_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_flag_config_scheduled_change ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_flag_config_scheduled_change"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_flag_config_scheduled_change"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.get_flag_config_scheduled_change"
  end
  # verify the required parameter 'scheduled_change_id' is set
  if @api_client.config.client_side_validation && scheduled_change_id.nil?
    fail ArgumentError, "Missing the required parameter 'scheduled_change_id' when calling FeatureFlagsApi.get_flag_config_scheduled_change"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'scheduledChangeId' + '}', scheduled_change_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlagScheduledChange')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#get_flag_config_scheduled_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, opts = {}) ⇒ FeatureFlagScheduledChanges

Get all scheduled workflows for a feature flag by key.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



874
875
876
877
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 874

def get_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, opts = {})
  data, _status_code, _headers = get_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, opts)
  data
end

#get_flag_config_scheduled_changes_conflicts(project_key, feature_flag_key, environment_key, flag_config_scheduled_changes_conflicts_body, opts = {}) ⇒ FeatureFlagScheduledChangesConflicts

Lists conflicts between the given instructions and any existing scheduled changes for the feature flag. The actual HTTP verb should be REPORT, not POST.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • flag_config_scheduled_changes_conflicts_body

    Used to determine if a semantic patch will result in conflicts with scheduled changes on a feature flag.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



939
940
941
942
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 939

def get_flag_config_scheduled_changes_conflicts(project_key, feature_flag_key, environment_key, flag_config_scheduled_changes_conflicts_body, opts = {})
  data, _status_code, _headers = get_flag_config_scheduled_changes_conflicts_with_http_info(project_key, feature_flag_key, environment_key, flag_config_scheduled_changes_conflicts_body, opts)
  data
end

#get_flag_config_scheduled_changes_conflicts_with_http_info(project_key, feature_flag_key, environment_key, flag_config_scheduled_changes_conflicts_body, opts = {}) ⇒ Array<(FeatureFlagScheduledChangesConflicts, Fixnum, Hash)>

Lists conflicts between the given instructions and any existing scheduled changes for the feature flag. The actual HTTP verb should be REPORT, not POST.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • flag_config_scheduled_changes_conflicts_body

    Used to determine if a semantic patch will result in conflicts with scheduled changes on a feature flag.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 951

def get_flag_config_scheduled_changes_conflicts_with_http_info(project_key, feature_flag_key, environment_key, flag_config_scheduled_changes_conflicts_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_flag_config_scheduled_changes_conflicts ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_flag_config_scheduled_changes_conflicts"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_flag_config_scheduled_changes_conflicts"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.get_flag_config_scheduled_changes_conflicts"
  end
  # verify the required parameter 'flag_config_scheduled_changes_conflicts_body' is set
  if @api_client.config.client_side_validation && flag_config_scheduled_changes_conflicts_body.nil?
    fail ArgumentError, "Missing the required parameter 'flag_config_scheduled_changes_conflicts_body' when calling FeatureFlagsApi.get_flag_config_scheduled_changes_conflicts"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes-conflicts'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(flag_config_scheduled_changes_conflicts_body)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlagScheduledChangesConflicts')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#get_flag_config_scheduled_changes_conflicts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(FeatureFlagScheduledChanges, Fixnum, Hash)>

Get all scheduled workflows for a feature flag by key.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 885

def get_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_flag_config_scheduled_changes ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_flag_config_scheduled_changes"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_flag_config_scheduled_changes"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.get_flag_config_scheduled_changes"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlagScheduledChanges')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#get_flag_config_scheduled_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_expiring_user_targets(project_key, environment_key, feature_flag_key, semantic_patch_with_comment, opts = {}) ⇒ UserTargetingExpirationForFlags

Update, add, or delete expiring user targets on feature flag

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • semantic_patch_with_comment

    Requires a Semantic Patch representation of the desired changes to the resource. &#39;apidocs.launchdarkly.com/reference#updates-via-semantic-patches&#39;. The addition of comments is also supported.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1009
1010
1011
1012
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1009

def patch_expiring_user_targets(project_key, environment_key, feature_flag_key, semantic_patch_with_comment, opts = {})
  data, _status_code, _headers = patch_expiring_user_targets_with_http_info(project_key, environment_key, feature_flag_key, semantic_patch_with_comment, opts)
  data
end

#patch_expiring_user_targets_with_http_info(project_key, environment_key, feature_flag_key, semantic_patch_with_comment, opts = {}) ⇒ Array<(UserTargetingExpirationForFlags, Fixnum, Hash)>

Update, add, or delete expiring user targets on feature flag

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • semantic_patch_with_comment

    Requires a Semantic Patch representation of the desired changes to the resource. &#39;apidocs.launchdarkly.com/reference#updates-via-semantic-patches&#39;. The addition of comments is also supported.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1021

def patch_expiring_user_targets_with_http_info(project_key, environment_key, feature_flag_key, semantic_patch_with_comment, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.patch_expiring_user_targets ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.patch_expiring_user_targets"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.patch_expiring_user_targets"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.patch_expiring_user_targets"
  end
  # verify the required parameter 'semantic_patch_with_comment' is set
  if @api_client.config.client_side_validation && semantic_patch_with_comment.nil?
    fail ArgumentError, "Missing the required parameter 'semantic_patch_with_comment' when calling FeatureFlagsApi.patch_expiring_user_targets"
  end
  # resource path
  local_var_path = '/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(semantic_patch_with_comment)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UserTargetingExpirationForFlags')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#patch_expiring_user_targets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_feature_flag(project_key, feature_flag_key, patch_comment, opts = {}) ⇒ FeatureFlag

Perform a partial update to a feature.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • patch_comment

    Requires a JSON Patch representation of the desired changes to the project, and an optional comment. &#39;jsonpatch.com/&#39; Feature flag patches also support JSON Merge Patch format. &#39;tools.ietf.org/html/rfc7386&#39; The addition of comments is also supported.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1078
1079
1080
1081
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1078

def patch_feature_flag(project_key, feature_flag_key, patch_comment, opts = {})
  data, _status_code, _headers = patch_feature_flag_with_http_info(project_key, feature_flag_key, patch_comment, opts)
  data
end

#patch_feature_flag_with_http_info(project_key, feature_flag_key, patch_comment, opts = {}) ⇒ Array<(FeatureFlag, Fixnum, Hash)>

Perform a partial update to a feature.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • patch_comment

    Requires a JSON Patch representation of the desired changes to the project, and an optional comment. &#39;jsonpatch.com/&#39; Feature flag patches also support JSON Merge Patch format. &#39;tools.ietf.org/html/rfc7386&#39; The addition of comments is also supported.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FeatureFlag, Fixnum, Hash)>)

    FeatureFlag data, response status code and response headers



1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1089

def patch_feature_flag_with_http_info(project_key, feature_flag_key, patch_comment, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.patch_feature_flag ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.patch_feature_flag"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.patch_feature_flag"
  end
  # verify the required parameter 'patch_comment' is set
  if @api_client.config.client_side_validation && patch_comment.nil?
    fail ArgumentError, "Missing the required parameter 'patch_comment' when calling FeatureFlagsApi.patch_feature_flag"
  end
  # resource path
  local_var_path = '/flags/{projectKey}/{featureFlagKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(patch_comment)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlag')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#patch_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_flag_config_scheduled_change(project_key, feature_flag_key, flag_config_scheduled_changes_patch_body, environment_key, scheduled_change_id, opts = {}) ⇒ FeatureFlagScheduledChange

Updates an existing scheduled-change on a feature flag in an environment.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • flag_config_scheduled_changes_patch_body

    Update scheduled changes on a feature flag.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • scheduled_change_id

    The id of the scheduled change

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1144
1145
1146
1147
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1144

def patch_flag_config_scheduled_change(project_key, feature_flag_key, flag_config_scheduled_changes_patch_body, environment_key, scheduled_change_id, opts = {})
  data, _status_code, _headers = patch_flag_config_scheduled_change_with_http_info(project_key, feature_flag_key, flag_config_scheduled_changes_patch_body, environment_key, scheduled_change_id, opts)
  data
end

#patch_flag_config_scheduled_change_with_http_info(project_key, feature_flag_key, flag_config_scheduled_changes_patch_body, environment_key, scheduled_change_id, opts = {}) ⇒ Array<(FeatureFlagScheduledChange, Fixnum, Hash)>

Updates an existing scheduled-change on a feature flag in an environment.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • flag_config_scheduled_changes_patch_body

    Update scheduled changes on a feature flag.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • scheduled_change_id

    The id of the scheduled change

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FeatureFlagScheduledChange, Fixnum, Hash)>)

    FeatureFlagScheduledChange data, response status code and response headers



1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1157

def patch_flag_config_scheduled_change_with_http_info(project_key, feature_flag_key, flag_config_scheduled_changes_patch_body, environment_key, scheduled_change_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.patch_flag_config_scheduled_change ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.patch_flag_config_scheduled_change"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.patch_flag_config_scheduled_change"
  end
  # verify the required parameter 'flag_config_scheduled_changes_patch_body' is set
  if @api_client.config.client_side_validation && flag_config_scheduled_changes_patch_body.nil?
    fail ArgumentError, "Missing the required parameter 'flag_config_scheduled_changes_patch_body' when calling FeatureFlagsApi.patch_flag_config_scheduled_change"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.patch_flag_config_scheduled_change"
  end
  # verify the required parameter 'scheduled_change_id' is set
  if @api_client.config.client_side_validation && scheduled_change_id.nil?
    fail ArgumentError, "Missing the required parameter 'scheduled_change_id' when calling FeatureFlagsApi.patch_flag_config_scheduled_change"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'scheduledChangeId' + '}', scheduled_change_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(flag_config_scheduled_changes_patch_body)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlagScheduledChange')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#patch_flag_config_scheduled_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_apply_approval_request(project_key, feature_flag_key, environment_key, approval_request_id, approval_request_apply_config_body, opts = {}) ⇒ ApprovalRequests

Apply approval request for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • approval_request_id

    The approval request ID

  • approval_request_apply_config_body

    Apply an approval request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1220
1221
1222
1223
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1220

def post_apply_approval_request(project_key, feature_flag_key, environment_key, approval_request_id, approval_request_apply_config_body, opts = {})
  data, _status_code, _headers = post_apply_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, approval_request_apply_config_body, opts)
  data
end

#post_apply_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, approval_request_apply_config_body, opts = {}) ⇒ Array<(ApprovalRequests, Fixnum, Hash)>

Apply approval request for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • approval_request_id

    The approval request ID

  • approval_request_apply_config_body

    Apply an approval request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApprovalRequests, Fixnum, Hash)>)

    ApprovalRequests data, response status code and response headers



1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1233

def post_apply_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, approval_request_apply_config_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.post_apply_approval_request ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.post_apply_approval_request"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.post_apply_approval_request"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.post_apply_approval_request"
  end
  # verify the required parameter 'approval_request_id' is set
  if @api_client.config.client_side_validation && approval_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'approval_request_id' when calling FeatureFlagsApi.post_apply_approval_request"
  end
  # verify the required parameter 'approval_request_apply_config_body' is set
  if @api_client.config.client_side_validation && approval_request_apply_config_body.nil?
    fail ArgumentError, "Missing the required parameter 'approval_request_apply_config_body' when calling FeatureFlagsApi.post_apply_approval_request"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/apply'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'approvalRequestId' + '}', approval_request_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(approval_request_apply_config_body)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApprovalRequests')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#post_apply_approval_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_approval_request(project_key, feature_flag_key, environment_key, approval_request_id, opts = {}) ⇒ ApprovalRequest

Create an approval request for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • approval_request_id

    The approval request ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1296
1297
1298
1299
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1296

def post_approval_request(project_key, feature_flag_key, environment_key, approval_request_id, opts = {})
  data, _status_code, _headers = post_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, opts)
  data
end

#post_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, opts = {}) ⇒ Array<(ApprovalRequest, Fixnum, Hash)>

Create an approval request for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • approval_request_id

    The approval request ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApprovalRequest, Fixnum, Hash)>)

    ApprovalRequest data, response status code and response headers



1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1309

def post_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.post_approval_request ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.post_approval_request"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.post_approval_request"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.post_approval_request"
  end
  # verify the required parameter 'approval_request_id' is set
  if @api_client.config.client_side_validation && approval_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'approval_request_id' when calling FeatureFlagsApi.post_approval_request"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'approvalRequestId' + '}', approval_request_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'approval_request_config_body'])
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApprovalRequest')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#post_approval_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_feature_flag(project_key, feature_flag_body, opts = {}) ⇒ FeatureFlag

Creates a new feature flag.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_body

    Create a new feature flag.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :clone (String)

    The key of the feature flag to be cloned. The key identifies the flag in your code. For example, setting clone&#x3D;flagKey will copy the full targeting configuration for all environments (including on/off state) from the original flag to the new flag.

Returns:



1366
1367
1368
1369
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1366

def post_feature_flag(project_key, feature_flag_body, opts = {})
  data, _status_code, _headers = post_feature_flag_with_http_info(project_key, feature_flag_body, opts)
  data
end

#post_feature_flag_with_http_info(project_key, feature_flag_body, opts = {}) ⇒ Array<(FeatureFlag, Fixnum, Hash)>

Creates a new feature flag.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_body

    Create a new feature flag.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :clone (String)

    The key of the feature flag to be cloned. The key identifies the flag in your code. For example, setting clone&#x3D;flagKey will copy the full targeting configuration for all environments (including on/off state) from the original flag to the new flag.

Returns:

  • (Array<(FeatureFlag, Fixnum, Hash)>)

    FeatureFlag data, response status code and response headers



1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1377

def post_feature_flag_with_http_info(project_key, feature_flag_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.post_feature_flag ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.post_feature_flag"
  end
  # verify the required parameter 'feature_flag_body' is set
  if @api_client.config.client_side_validation && feature_flag_body.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_body' when calling FeatureFlagsApi.post_feature_flag"
  end
  # resource path
  local_var_path = '/flags/{projectKey}'.sub('{' + 'projectKey' + '}', project_key.to_s)

  # query parameters
  query_params = {}
  query_params[:'clone'] = opts[:'clone'] if !opts[:'clone'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(feature_flag_body)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlag')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#post_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_flag_config_scheduled_changes(project_key, flag_config_scheduled_changes_post_body, feature_flag_key, environment_key, opts = {}) ⇒ FeatureFlagScheduledChange

Creates a new scheduled change for a feature flag.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • flag_config_scheduled_changes_post_body

    Create scheduled changes on a feature flag.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1428
1429
1430
1431
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1428

def post_flag_config_scheduled_changes(project_key, flag_config_scheduled_changes_post_body, feature_flag_key, environment_key, opts = {})
  data, _status_code, _headers = post_flag_config_scheduled_changes_with_http_info(project_key, flag_config_scheduled_changes_post_body, feature_flag_key, environment_key, opts)
  data
end

#post_flag_config_scheduled_changes_with_http_info(project_key, flag_config_scheduled_changes_post_body, feature_flag_key, environment_key, opts = {}) ⇒ Array<(FeatureFlagScheduledChange, Fixnum, Hash)>

Creates a new scheduled change for a feature flag.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • flag_config_scheduled_changes_post_body

    Create scheduled changes on a feature flag.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FeatureFlagScheduledChange, Fixnum, Hash)>)

    FeatureFlagScheduledChange data, response status code and response headers



1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1440

def post_flag_config_scheduled_changes_with_http_info(project_key, flag_config_scheduled_changes_post_body, feature_flag_key, environment_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.post_flag_config_scheduled_changes ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.post_flag_config_scheduled_changes"
  end
  # verify the required parameter 'flag_config_scheduled_changes_post_body' is set
  if @api_client.config.client_side_validation && flag_config_scheduled_changes_post_body.nil?
    fail ArgumentError, "Missing the required parameter 'flag_config_scheduled_changes_post_body' when calling FeatureFlagsApi.post_flag_config_scheduled_changes"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.post_flag_config_scheduled_changes"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.post_flag_config_scheduled_changes"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(flag_config_scheduled_changes_post_body)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FeatureFlagScheduledChange')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#post_flag_config_scheduled_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_review_approval_request(project_key, feature_flag_key, environment_key, approval_request_id, approval_request_review_config_body, opts = {}) ⇒ ApprovalRequests

Review approval request for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • approval_request_id

    The approval request ID

  • approval_request_review_config_body

    Review an approval request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1499
1500
1501
1502
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1499

def post_review_approval_request(project_key, feature_flag_key, environment_key, approval_request_id, approval_request_review_config_body, opts = {})
  data, _status_code, _headers = post_review_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, approval_request_review_config_body, opts)
  data
end

#post_review_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, approval_request_review_config_body, opts = {}) ⇒ Array<(ApprovalRequests, Fixnum, Hash)>

Review approval request for a feature flag config

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • feature_flag_key

    The feature flag&#39;s key. The key identifies the flag in your code.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • approval_request_id

    The approval request ID

  • approval_request_review_config_body

    Review an approval request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApprovalRequests, Fixnum, Hash)>)

    ApprovalRequests data, response status code and response headers



1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1512

def post_review_approval_request_with_http_info(project_key, feature_flag_key, environment_key, approval_request_id, approval_request_review_config_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.post_review_approval_request ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.post_review_approval_request"
  end
  # verify the required parameter 'feature_flag_key' is set
  if @api_client.config.client_side_validation && feature_flag_key.nil?
    fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.post_review_approval_request"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.post_review_approval_request"
  end
  # verify the required parameter 'approval_request_id' is set
  if @api_client.config.client_side_validation && approval_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'approval_request_id' when calling FeatureFlagsApi.post_review_approval_request"
  end
  # verify the required parameter 'approval_request_review_config_body' is set
  if @api_client.config.client_side_validation && approval_request_review_config_body.nil?
    fail ArgumentError, "Missing the required parameter 'approval_request_review_config_body' when calling FeatureFlagsApi.post_review_approval_request"
  end
  # resource path
  local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/review'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'approvalRequestId' + '}', approval_request_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(approval_request_review_config_body)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApprovalRequests')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FeatureFlagsApi#post_review_approval_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end