Class: LaunchDarklyApi::FeatureFlagsApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::FeatureFlagsApi
- Defined in:
- lib/launchdarkly_api/api/feature_flags_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#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.
-
#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.
-
#delete_feature_flag(project_key, feature_flag_key, opts = {}) ⇒ nil
Delete a feature flag in all environments.
-
#delete_feature_flag_with_http_info(project_key, feature_flag_key, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a feature flag in all environments.
-
#get_expiring_user_targets(project_key, environment_key, feature_flag_key, opts = {}) ⇒ UserTargetingExpirationForFlags
Get expiring user targets for feature flag.
-
#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.
-
#get_feature_flag(project_key, feature_flag_key, opts = {}) ⇒ FeatureFlag
Get a single feature flag by key.
-
#get_feature_flag_change_request(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, opts = {}) ⇒ FeatureFlagChangeRequests
Get a single change request for a feature flag.
-
#get_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, opts = {}) ⇒ Array<(FeatureFlagChangeRequests, Fixnum, Hash)>
Get a single change request for a feature flag.
-
#get_feature_flag_change_requests(project_key, feature_flag_key, environment_key, opts = {}) ⇒ FeatureFlagChangeRequests
Get all change requests for a feature flag.
-
#get_feature_flag_change_requests_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(FeatureFlagChangeRequests, Fixnum, Hash)>
Get all change requests for a feature flag.
-
#get_feature_flag_status(project_key, environment_key, feature_flag_key, opts = {}) ⇒ FeatureFlagStatus
Get the status for a particular feature flag.
-
#get_feature_flag_status_across_environments(project_key, feature_flag_key, opts = {}) ⇒ FeatureFlagStatusAcrossEnvironments
Get the status for a particular feature flag across environments.
-
#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.
-
#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.
-
#get_feature_flag_statuses(project_key, environment_key, opts = {}) ⇒ FeatureFlagStatuses
Get a list of statuses for all feature flags.
-
#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.
-
#get_feature_flag_with_http_info(project_key, feature_flag_key, opts = {}) ⇒ Array<(FeatureFlag, Fixnum, Hash)>
Get a single feature flag by key.
-
#get_feature_flags(project_key, opts = {}) ⇒ FeatureFlags
Get a list of all features in the given project.
-
#get_feature_flags_with_http_info(project_key, opts = {}) ⇒ Array<(FeatureFlags, Fixnum, Hash)>
Get a list of all features in the given project.
-
#initialize(api_client = ApiClient.default) ⇒ FeatureFlagsApi
constructor
A new instance of FeatureFlagsApi.
-
#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.
-
#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.
-
#patch_feature_flag(project_key, feature_flag_key, patch_comment, opts = {}) ⇒ FeatureFlag
Perform a partial update to a feature.
-
#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.
-
#post_apply_feature_flag_change_request(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_apply_config_body, opts = {}) ⇒ FeatureFlagChangeRequests
Apply change request for a feature flag.
-
#post_apply_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_apply_config_body, opts = {}) ⇒ Array<(FeatureFlagChangeRequests, Fixnum, Hash)>
Apply change request for a feature flag.
-
#post_feature_flag(project_key, feature_flag_body, opts = {}) ⇒ FeatureFlag
Creates a new feature flag.
- #post_feature_flag_change_request(project_key, feature_flag_key, environment_key, opts = {}) ⇒ FeatureFlagChangeRequest
-
#post_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(FeatureFlagChangeRequest, Fixnum, Hash)>
FeatureFlagChangeRequest data, response status code and response headers.
-
#post_feature_flag_with_http_info(project_key, feature_flag_body, opts = {}) ⇒ Array<(FeatureFlag, Fixnum, Hash)>
Creates a new feature flag.
-
#post_review_feature_flag_change_request(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_review_config_body, opts = {}) ⇒ FeatureFlagChangeRequests
Review change request for a feature flag.
-
#post_review_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_review_config_body, opts = {}) ⇒ Array<(FeatureFlagChangeRequests, Fixnum, Hash)>
Review change request for a feature flag.
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_client ⇒ Object
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.
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.
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_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.
91 92 93 94 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 91 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.
101 102 103 104 105 106 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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 101 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 |
#get_expiring_user_targets(project_key, environment_key, feature_flag_key, opts = {}) ⇒ UserTargetingExpirationForFlags
Get expiring user targets for feature flag
149 150 151 152 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 149 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
160 161 162 163 164 165 166 167 168 169 170 171 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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 160 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.
213 214 215 216 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 213 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_change_request(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, opts = {}) ⇒ FeatureFlagChangeRequests
Get a single change request for a feature flag
275 276 277 278 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 275 def get_feature_flag_change_request(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, opts = {}) data, _status_code, _headers = get_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, opts) data end |
#get_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, opts = {}) ⇒ Array<(FeatureFlagChangeRequests, Fixnum, Hash)>
Get a single change request for a feature flag
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 287 def get_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_feature_flag_change_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_feature_flag_change_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_feature_flag_change_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_feature_flag_change_request" end # verify the required parameter 'feature_flag_change_request_id' is set if @api_client.config.client_side_validation && feature_flag_change_request_id.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_change_request_id' when calling FeatureFlagsApi.get_feature_flag_change_request" end # resource path local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{featureFlagChangeRequestId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'featureFlagChangeRequestId' + '}', feature_flag_change_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 => 'FeatureFlagChangeRequests') if @api_client.config.debugging @api_client.config.logger.debug "API called: FeatureFlagsApi#get_feature_flag_change_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_feature_flag_change_requests(project_key, feature_flag_key, environment_key, opts = {}) ⇒ FeatureFlagChangeRequests
Get all change requests for a feature flag
344 345 346 347 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 344 def get_feature_flag_change_requests(project_key, feature_flag_key, environment_key, opts = {}) data, _status_code, _headers = get_feature_flag_change_requests_with_http_info(project_key, feature_flag_key, environment_key, opts) data end |
#get_feature_flag_change_requests_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(FeatureFlagChangeRequests, Fixnum, Hash)>
Get all change requests for a feature flag
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 355 def get_feature_flag_change_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_feature_flag_change_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_feature_flag_change_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_feature_flag_change_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_feature_flag_change_requests" end # resource path local_var_path = '/{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 => 'FeatureFlagChangeRequests') if @api_client.config.debugging @api_client.config.logger.debug "API called: FeatureFlagsApi#get_feature_flag_change_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_feature_flag_status(project_key, environment_key, feature_flag_key, opts = {}) ⇒ FeatureFlagStatus
Get the status for a particular feature flag.
408 409 410 411 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 408 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
471 472 473 474 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 471 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
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 481 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.
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 419 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.
529 530 531 532 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 529 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.
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 539 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.
224 225 226 227 228 229 230 231 232 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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 224 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.
594 595 596 597 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 594 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.
611 612 613 614 615 616 617 618 619 620 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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 611 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 |
#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
665 666 667 668 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 665 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
677 678 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 722 723 724 725 726 727 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 677 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.
734 735 736 737 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 734 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.
745 746 747 748 749 750 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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 745 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 |
#post_apply_feature_flag_change_request(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_apply_config_body, opts = {}) ⇒ FeatureFlagChangeRequests
Apply change request for a feature flag
800 801 802 803 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 800 def post_apply_feature_flag_change_request(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_apply_config_body, opts = {}) data, _status_code, _headers = post_apply_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_apply_config_body, opts) data end |
#post_apply_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_apply_config_body, opts = {}) ⇒ Array<(FeatureFlagChangeRequests, Fixnum, Hash)>
Apply change request for a feature flag
813 814 815 816 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 813 def post_apply_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_apply_config_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.post_apply_feature_flag_change_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_feature_flag_change_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_feature_flag_change_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_feature_flag_change_request" end # verify the required parameter 'feature_flag_change_request_id' is set if @api_client.config.client_side_validation && feature_flag_change_request_id.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_change_request_id' when calling FeatureFlagsApi.post_apply_feature_flag_change_request" end # verify the required parameter 'feature_flag_change_request_apply_config_body' is set if @api_client.config.client_side_validation && feature_flag_change_request_apply_config_body.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_change_request_apply_config_body' when calling FeatureFlagsApi.post_apply_feature_flag_change_request" end # resource path local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{featureFlagChangeRequestId}/apply'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'featureFlagChangeRequestId' + '}', feature_flag_change_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(feature_flag_change_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 => 'FeatureFlagChangeRequests') if @api_client.config.debugging @api_client.config.logger.debug "API called: FeatureFlagsApi#post_apply_feature_flag_change_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.
874 875 876 877 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 874 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_change_request(project_key, feature_flag_key, environment_key, opts = {}) ⇒ FeatureFlagChangeRequest
935 936 937 938 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 935 def post_feature_flag_change_request(project_key, feature_flag_key, environment_key, opts = {}) data, _status_code, _headers = post_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, opts) data end |
#post_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(FeatureFlagChangeRequest, Fixnum, Hash)>
Returns FeatureFlagChangeRequest data, response status code and response headers.
946 947 948 949 950 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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 946 def post_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.post_feature_flag_change_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_feature_flag_change_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_feature_flag_change_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_feature_flag_change_request" end # resource path local_var_path = '/{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 = @api_client.object_to_http_body(opts[:'feature_flag_change_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 => 'FeatureFlagChangeRequest') if @api_client.config.debugging @api_client.config.logger.debug "API called: FeatureFlagsApi#post_feature_flag_change_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_feature_flag_with_http_info(project_key, feature_flag_body, opts = {}) ⇒ Array<(FeatureFlag, Fixnum, Hash)>
Creates a new feature flag.
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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 885 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_review_feature_flag_change_request(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_review_config_body, opts = {}) ⇒ FeatureFlagChangeRequests
Review change request for a feature flag
1001 1002 1003 1004 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1001 def post_review_feature_flag_change_request(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_review_config_body, opts = {}) data, _status_code, _headers = post_review_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_review_config_body, opts) data end |
#post_review_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_review_config_body, opts = {}) ⇒ Array<(FeatureFlagChangeRequests, Fixnum, Hash)>
Review change request for a feature flag
1014 1015 1016 1017 1018 1019 1020 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 |
# File 'lib/launchdarkly_api/api/feature_flags_api.rb', line 1014 def post_review_feature_flag_change_request_with_http_info(project_key, feature_flag_key, environment_key, feature_flag_change_request_id, feature_flag_change_request_review_config_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.post_review_feature_flag_change_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_feature_flag_change_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_feature_flag_change_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_feature_flag_change_request" end # verify the required parameter 'feature_flag_change_request_id' is set if @api_client.config.client_side_validation && feature_flag_change_request_id.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_change_request_id' when calling FeatureFlagsApi.post_review_feature_flag_change_request" end # verify the required parameter 'feature_flag_change_request_review_config_body' is set if @api_client.config.client_side_validation && feature_flag_change_request_review_config_body.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_change_request_review_config_body' when calling FeatureFlagsApi.post_review_feature_flag_change_request" end # resource path local_var_path = '/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{featureFlagChangeRequestId}/review'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'featureFlagChangeRequestId' + '}', feature_flag_change_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(feature_flag_change_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 => 'FeatureFlagChangeRequests') if @api_client.config.debugging @api_client.config.logger.debug "API called: FeatureFlagsApi#post_review_feature_flag_change_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |