Class: LaunchDarklyApi::ApprovalsApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::ApprovalsApi
- Defined in:
- lib/launchdarkly_api/api/approvals_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_approval_request(id, opts = {}) ⇒ nil
Delete approval request Delete an approval request.
-
#delete_approval_request_for_flag(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ nil
Delete approval request for a flag Delete an approval request for a feature flag.
-
#delete_approval_request_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete approval request for a flag Delete an approval request for a feature flag.
-
#delete_approval_request_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete approval request Delete an approval request.
-
#get_approval_for_flag(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ FlagConfigApprovalRequestResponse
Get approval request for a flag Get a single approval request for a feature flag.
-
#get_approval_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ Array<(FlagConfigApprovalRequestResponse, Integer, Hash)>
Get approval request for a flag Get a single approval request for a feature flag.
-
#get_approval_request(id, opts = {}) ⇒ ExpandableApprovalRequestResponse
Get approval request Get an approval request by approval request ID.
-
#get_approval_request_with_http_info(id, opts = {}) ⇒ Array<(ExpandableApprovalRequestResponse, Integer, Hash)>
Get approval request Get an approval request by approval request ID.
-
#get_approval_requests(opts = {}) ⇒ ExpandableApprovalRequestsResponse
List approval requests Get all approval requests.
-
#get_approval_requests_with_http_info(opts = {}) ⇒ Array<(ExpandableApprovalRequestsResponse, Integer, Hash)>
List approval requests Get all approval requests.
-
#get_approvals_for_flag(project_key, feature_flag_key, environment_key, opts = {}) ⇒ FlagConfigApprovalRequestsResponse
List approval requests for a flag Get all approval requests for a feature flag.
-
#get_approvals_for_flag_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(FlagConfigApprovalRequestsResponse, Integer, Hash)>
List approval requests for a flag Get all approval requests for a feature flag.
-
#initialize(api_client = ApiClient.default) ⇒ ApprovalsApi
constructor
A new instance of ApprovalsApi.
-
#post_approval_request(create_approval_request_request, opts = {}) ⇒ ApprovalRequestResponse
Create approval request Create an approval request.
-
#post_approval_request_apply(id, post_approval_request_apply_request, opts = {}) ⇒ ApprovalRequestResponse
Apply approval request Apply an approval request that has been approved.
-
#post_approval_request_apply_for_flag(project_key, feature_flag_key, environment_key, id, post_approval_request_apply_request, opts = {}) ⇒ FlagConfigApprovalRequestResponse
Apply approval request for a flag Apply an approval request that has been approved.
-
#post_approval_request_apply_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, post_approval_request_apply_request, opts = {}) ⇒ Array<(FlagConfigApprovalRequestResponse, Integer, Hash)>
Apply approval request for a flag Apply an approval request that has been approved.
-
#post_approval_request_apply_with_http_info(id, post_approval_request_apply_request, opts = {}) ⇒ Array<(ApprovalRequestResponse, Integer, Hash)>
Apply approval request Apply an approval request that has been approved.
-
#post_approval_request_for_flag(project_key, feature_flag_key, environment_key, create_flag_config_approval_request_request, opts = {}) ⇒ FlagConfigApprovalRequestResponse
Create approval request for a flag Create an approval request for a feature flag.
-
#post_approval_request_for_flag_with_http_info(project_key, feature_flag_key, environment_key, create_flag_config_approval_request_request, opts = {}) ⇒ Array<(FlagConfigApprovalRequestResponse, Integer, Hash)>
Create approval request for a flag Create an approval request for a feature flag.
-
#post_approval_request_review(id, post_approval_request_review_request, opts = {}) ⇒ ApprovalRequestResponse
Review approval request Review an approval request by approving or denying changes.
-
#post_approval_request_review_for_flag(project_key, feature_flag_key, environment_key, id, post_approval_request_review_request, opts = {}) ⇒ FlagConfigApprovalRequestResponse
Review approval request for a flag Review an approval request by approving or denying changes.
-
#post_approval_request_review_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, post_approval_request_review_request, opts = {}) ⇒ Array<(FlagConfigApprovalRequestResponse, Integer, Hash)>
Review approval request for a flag Review an approval request by approving or denying changes.
-
#post_approval_request_review_with_http_info(id, post_approval_request_review_request, opts = {}) ⇒ Array<(ApprovalRequestResponse, Integer, Hash)>
Review approval request Review an approval request by approving or denying changes.
-
#post_approval_request_with_http_info(create_approval_request_request, opts = {}) ⇒ Array<(ApprovalRequestResponse, Integer, Hash)>
Create approval request Create an approval request.
-
#post_flag_copy_config_approval_request(project_key, feature_flag_key, environment_key, create_copy_flag_config_approval_request_request, opts = {}) ⇒ FlagConfigApprovalRequestResponse
Create approval request to copy flag configurations across environments Create an approval request to copy a feature flag's configuration across environments.
-
#post_flag_copy_config_approval_request_with_http_info(project_key, feature_flag_key, environment_key, create_copy_flag_config_approval_request_request, opts = {}) ⇒ Array<(FlagConfigApprovalRequestResponse, Integer, Hash)>
Create approval request to copy flag configurations across environments Create an approval request to copy a feature flag's configuration across environments.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ApprovalsApi
Returns a new instance of ApprovalsApi.
19 20 21 |
# File 'lib/launchdarkly_api/api/approvals_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/approvals_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_approval_request(id, opts = {}) ⇒ nil
Delete approval request Delete an approval request.
27 28 29 30 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 27 def delete_approval_request(id, opts = {}) delete_approval_request_with_http_info(id, opts) nil end |
#delete_approval_request_for_flag(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ nil
Delete approval request for a flag Delete an approval request for a feature flag.
93 94 95 96 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 93 def delete_approval_request_for_flag(project_key, feature_flag_key, environment_key, id, opts = {}) delete_approval_request_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, opts) nil end |
#delete_approval_request_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete approval request for a flag Delete an approval request for a feature flag.
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 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 106 def delete_approval_request_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.delete_approval_request_for_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 ApprovalsApi.delete_approval_request_for_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 ApprovalsApi.delete_approval_request_for_flag" 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 ApprovalsApi.delete_approval_request_for_flag" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ApprovalsApi.delete_approval_request_for_flag" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.delete_approval_request_for_flag", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#delete_approval_request_for_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_approval_request_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete approval request Delete an approval request.
37 38 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 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 37 def delete_approval_request_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.delete_approval_request ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ApprovalsApi.delete_approval_request" end # resource path local_var_path = '/api/v2/approval-requests/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.delete_approval_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#delete_approval_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_approval_for_flag(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ FlagConfigApprovalRequestResponse
Get approval request for a flag Get a single approval request for a feature flag.
174 175 176 177 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 174 def get_approval_for_flag(project_key, feature_flag_key, environment_key, id, opts = {}) data, _status_code, _headers = get_approval_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, opts) data end |
#get_approval_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ Array<(FlagConfigApprovalRequestResponse, Integer, Hash)>
Get approval request for a flag Get a single approval request for a feature flag.
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 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 187 def get_approval_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.get_approval_for_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 ApprovalsApi.get_approval_for_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 ApprovalsApi.get_approval_for_flag" 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 ApprovalsApi.get_approval_for_flag" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ApprovalsApi.get_approval_for_flag" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FlagConfigApprovalRequestResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.get_approval_for_flag", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#get_approval_for_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_approval_request(id, opts = {}) ⇒ ExpandableApprovalRequestResponse
Get approval request
Get an approval request by approval request ID. ### Expanding approval response LaunchDarkly supports the expand query param to include additional fields in the response, with the following fields: - environments includes the environments the approval request relates to - flag includes the flag the approval request belongs to - project includes the project the approval request belongs to - resource includes details on the resource (flag or segment) the approval request relates to For example, expand=project,flag includes the project and flag fields in the response.
253 254 255 256 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 253 def get_approval_request(id, opts = {}) data, _status_code, _headers = get_approval_request_with_http_info(id, opts) data end |
#get_approval_request_with_http_info(id, opts = {}) ⇒ Array<(ExpandableApprovalRequestResponse, Integer, Hash)>
Get approval request Get an approval request by approval request ID. ### Expanding approval response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `environments` includes the environments the approval request relates to - `flag` includes the flag the approval request belongs to - `project` includes the project the approval request belongs to - `resource` includes details on the resource (flag or segment) the approval request relates to For example, `expand=project,flag` includes the `project` and `flag` fields in the response.
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 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 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 264 def get_approval_request_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.get_approval_request ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ApprovalsApi.get_approval_request" end # resource path local_var_path = '/api/v2/approval-requests/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExpandableApprovalRequestResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.get_approval_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#get_approval_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_approval_requests(opts = {}) ⇒ ExpandableApprovalRequestsResponse
List approval requests
Get all approval requests. ### Filtering approvals LaunchDarkly supports the filter query param for filtering, with the following fields: - notifyMemberIds filters for only approvals that are assigned to a member in the specified list. For example: filter=notifyMemberIds anyOf [\"memberId1\", \"memberId2\"]. - requestorId filters for only approvals that correspond to the ID of the member who requested the approval. For example: filter=requestorId equals 457034721476302714390214. - resourceId filters for only approvals that correspond to the the specified resource identifier. For example: filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag. - resourceKind filters for only approvals that correspond to the specified resource kind. For example: filter=resourceKind equals flag. Currently, flag, segment, and aiConfig resource kinds are supported. - reviewStatus filters for only approvals which correspond to the review status in the specified list. The possible values are approved, declined, and pending. For example: filter=reviewStatus anyOf [\"pending\", \"approved\"]. - status filters for only approvals which correspond to the status in the specified list. The possible values are pending, scheduled, failed, and completed. For example: filter=status anyOf [\"pending\", \"scheduled\"]. You can also apply multiple filters at once. For example, setting filter=projectKey equals my-project, reviewStatus anyOf [\"pending\",\"approved\"] matches approval requests which correspond to the my-project project key, and a review status of either pending or approved. ### Expanding approval response LaunchDarkly supports the expand query param to include additional fields in the response, with the following fields: - flag includes the flag the approval request belongs to - project includes the project the approval request belongs to - environments includes the environments the approval request relates to For example, expand=project,flag includes the project and flag fields in the response.
321 322 323 324 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 321 def get_approval_requests(opts = {}) data, _status_code, _headers = get_approval_requests_with_http_info(opts) data end |
#get_approval_requests_with_http_info(opts = {}) ⇒ Array<(ExpandableApprovalRequestsResponse, Integer, Hash)>
List approval requests Get all approval requests. ### Filtering approvals LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf ["memberId1", "memberId2"]`. - `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`. - `resourceId` filters for only approvals that correspond to the the specified resource identifier. For example: `filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag`. - `resourceKind` filters for only approvals that correspond to the specified resource kind. For example: `filter=resourceKind equals flag`. Currently, `flag`, `segment`, and `aiConfig` resource kinds are supported. - `reviewStatus` filters for only approvals which correspond to the review status in the specified list. The possible values are `approved`, `declined`, and `pending`. For example: `filter=reviewStatus anyOf ["pending", "approved"]`. - `status` filters for only approvals which correspond to the status in the specified list. The possible values are `pending`, `scheduled`, `failed`, and `completed`. For example: `filter=status anyOf ["pending", "scheduled"]`. You can also apply multiple filters at once. For example, setting `filter=projectKey equals my-project, reviewStatus anyOf ["pending","approved"]` matches approval requests which correspond to the `my-project` project key, and a review status of either `pending` or `approved`. ### Expanding approval response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `flag` includes the flag the approval request belongs to - `project` includes the project the approval request belongs to - `environments` includes the environments the approval request relates to For example, `expand=project,flag` includes the `project` and `flag` fields in the response.
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 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 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 334 def get_approval_requests_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.get_approval_requests ...' end # resource path local_var_path = '/api/v2/approval-requests' # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExpandableApprovalRequestsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.get_approval_requests", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#get_approval_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_approvals_for_flag(project_key, feature_flag_key, environment_key, opts = {}) ⇒ FlagConfigApprovalRequestsResponse
List approval requests for a flag Get all approval requests for a feature flag.
389 390 391 392 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 389 def get_approvals_for_flag(project_key, feature_flag_key, environment_key, opts = {}) data, _status_code, _headers = get_approvals_for_flag_with_http_info(project_key, feature_flag_key, environment_key, opts) data end |
#get_approvals_for_flag_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(FlagConfigApprovalRequestsResponse, Integer, Hash)>
List approval requests for a flag Get all approval requests for a feature flag.
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 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 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 401 def get_approvals_for_flag_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.get_approvals_for_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 ApprovalsApi.get_approvals_for_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 ApprovalsApi.get_approvals_for_flag" 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 ApprovalsApi.get_approvals_for_flag" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FlagConfigApprovalRequestsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.get_approvals_for_flag", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#get_approvals_for_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_approval_request(create_approval_request_request, opts = {}) ⇒ ApprovalRequestResponse
Create approval request
Create an approval request. This endpoint requires a list of instructions, in semantic patch format, that will be applied when the approval request is approved and applied. ### Flags If you are creating an approval request for a flag, you can use the following instructions: - addVariation - removeVariation - updateVariation - updateDefaultVariation For details on using these instructions, read Update feature flag. To create an approval for a flag specific to an environment, use Create approval request for a flag. ### AgentControl If you are creating an approval request for an AgentControl config, you can use the semantic patch instructions listed under Update config targeting. ### Segments If you are creating an approval request for a segment, you can use the semantic patch instructions listed under Patch segment.
462 463 464 465 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 462 def post_approval_request(create_approval_request_request, opts = {}) data, _status_code, _headers = post_approval_request_with_http_info(create_approval_request_request, opts) data end |
#post_approval_request_apply(id, post_approval_request_apply_request, opts = {}) ⇒ ApprovalRequestResponse
Apply approval request Apply an approval request that has been approved. This endpoint works with any approval requests.
531 532 533 534 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 531 def post_approval_request_apply(id, post_approval_request_apply_request, opts = {}) data, _status_code, _headers = post_approval_request_apply_with_http_info(id, post_approval_request_apply_request, opts) data end |
#post_approval_request_apply_for_flag(project_key, feature_flag_key, environment_key, id, post_approval_request_apply_request, opts = {}) ⇒ FlagConfigApprovalRequestResponse
Apply approval request for a flag Apply an approval request that has been approved. This endpoint requires a feature flag key, and can only be used for applying approval requests on flags.
608 609 610 611 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 608 def post_approval_request_apply_for_flag(project_key, feature_flag_key, environment_key, id, post_approval_request_apply_request, opts = {}) data, _status_code, _headers = post_approval_request_apply_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, post_approval_request_apply_request, opts) data end |
#post_approval_request_apply_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, post_approval_request_apply_request, opts = {}) ⇒ Array<(FlagConfigApprovalRequestResponse, Integer, Hash)>
Apply approval request for a flag Apply an approval request that has been approved. This endpoint requires a feature flag key, and can only be used for applying approval requests on flags.
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 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 622 def post_approval_request_apply_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, post_approval_request_apply_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.post_approval_request_apply_for_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 ApprovalsApi.post_approval_request_apply_for_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 ApprovalsApi.post_approval_request_apply_for_flag" 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 ApprovalsApi.post_approval_request_apply_for_flag" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ApprovalsApi.post_approval_request_apply_for_flag" end # verify the required parameter 'post_approval_request_apply_request' is set if @api_client.config.client_side_validation && post_approval_request_apply_request.nil? fail ArgumentError, "Missing the required parameter 'post_approval_request_apply_request' when calling ApprovalsApi.post_approval_request_apply_for_flag" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(post_approval_request_apply_request) # return_type return_type = opts[:debug_return_type] || 'FlagConfigApprovalRequestResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.post_approval_request_apply_for_flag", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#post_approval_request_apply_for_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_approval_request_apply_with_http_info(id, post_approval_request_apply_request, opts = {}) ⇒ Array<(ApprovalRequestResponse, Integer, Hash)>
Apply approval request Apply an approval request that has been approved. This endpoint works with any approval requests.
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 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 542 def post_approval_request_apply_with_http_info(id, post_approval_request_apply_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.post_approval_request_apply ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ApprovalsApi.post_approval_request_apply" end # verify the required parameter 'post_approval_request_apply_request' is set if @api_client.config.client_side_validation && post_approval_request_apply_request.nil? fail ArgumentError, "Missing the required parameter 'post_approval_request_apply_request' when calling ApprovalsApi.post_approval_request_apply" end # resource path local_var_path = '/api/v2/approval-requests/{id}/apply'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(post_approval_request_apply_request) # return_type return_type = opts[:debug_return_type] || 'ApprovalRequestResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.post_approval_request_apply", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#post_approval_request_apply\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_approval_request_for_flag(project_key, feature_flag_key, environment_key, create_flag_config_approval_request_request, opts = {}) ⇒ FlagConfigApprovalRequestResponse
Create approval request for a flag Create an approval request for a feature flag.
699 700 701 702 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 699 def post_approval_request_for_flag(project_key, feature_flag_key, environment_key, create_flag_config_approval_request_request, opts = {}) data, _status_code, _headers = post_approval_request_for_flag_with_http_info(project_key, feature_flag_key, environment_key, create_flag_config_approval_request_request, opts) data end |
#post_approval_request_for_flag_with_http_info(project_key, feature_flag_key, environment_key, create_flag_config_approval_request_request, opts = {}) ⇒ Array<(FlagConfigApprovalRequestResponse, Integer, Hash)>
Create approval request for a flag Create an approval request for a feature flag.
712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 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 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 712 def post_approval_request_for_flag_with_http_info(project_key, feature_flag_key, environment_key, create_flag_config_approval_request_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.post_approval_request_for_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 ApprovalsApi.post_approval_request_for_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 ApprovalsApi.post_approval_request_for_flag" 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 ApprovalsApi.post_approval_request_for_flag" end # verify the required parameter 'create_flag_config_approval_request_request' is set if @api_client.config.client_side_validation && create_flag_config_approval_request_request.nil? fail ArgumentError, "Missing the required parameter 'create_flag_config_approval_request_request' when calling ApprovalsApi.post_approval_request_for_flag" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_flag_config_approval_request_request) # return_type return_type = opts[:debug_return_type] || 'FlagConfigApprovalRequestResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.post_approval_request_for_flag", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#post_approval_request_for_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_approval_request_review(id, post_approval_request_review_request, opts = {}) ⇒ ApprovalRequestResponse
Review approval request Review an approval request by approving or denying changes.
783 784 785 786 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 783 def post_approval_request_review(id, post_approval_request_review_request, opts = {}) data, _status_code, _headers = post_approval_request_review_with_http_info(id, post_approval_request_review_request, opts) data end |
#post_approval_request_review_for_flag(project_key, feature_flag_key, environment_key, id, post_approval_request_review_request, opts = {}) ⇒ FlagConfigApprovalRequestResponse
Review approval request for a flag Review an approval request by approving or denying changes.
860 861 862 863 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 860 def post_approval_request_review_for_flag(project_key, feature_flag_key, environment_key, id, post_approval_request_review_request, opts = {}) data, _status_code, _headers = post_approval_request_review_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, post_approval_request_review_request, opts) data end |
#post_approval_request_review_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, post_approval_request_review_request, opts = {}) ⇒ Array<(FlagConfigApprovalRequestResponse, Integer, Hash)>
Review approval request for a flag Review an approval request by approving or denying changes.
874 875 876 877 878 879 880 881 882 883 884 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 932 933 934 935 936 937 938 939 940 941 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 874 def post_approval_request_review_for_flag_with_http_info(project_key, feature_flag_key, environment_key, id, post_approval_request_review_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.post_approval_request_review_for_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 ApprovalsApi.post_approval_request_review_for_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 ApprovalsApi.post_approval_request_review_for_flag" 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 ApprovalsApi.post_approval_request_review_for_flag" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ApprovalsApi.post_approval_request_review_for_flag" end # verify the required parameter 'post_approval_request_review_request' is set if @api_client.config.client_side_validation && post_approval_request_review_request.nil? fail ArgumentError, "Missing the required parameter 'post_approval_request_review_request' when calling ApprovalsApi.post_approval_request_review_for_flag" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(post_approval_request_review_request) # return_type return_type = opts[:debug_return_type] || 'FlagConfigApprovalRequestResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.post_approval_request_review_for_flag", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#post_approval_request_review_for_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_approval_request_review_with_http_info(id, post_approval_request_review_request, opts = {}) ⇒ Array<(ApprovalRequestResponse, Integer, Hash)>
Review approval request Review an approval request by approving or denying changes.
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 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 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 794 def post_approval_request_review_with_http_info(id, post_approval_request_review_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.post_approval_request_review ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ApprovalsApi.post_approval_request_review" end # verify the required parameter 'post_approval_request_review_request' is set if @api_client.config.client_side_validation && post_approval_request_review_request.nil? fail ArgumentError, "Missing the required parameter 'post_approval_request_review_request' when calling ApprovalsApi.post_approval_request_review" end # resource path local_var_path = '/api/v2/approval-requests/{id}/reviews'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(post_approval_request_review_request) # return_type return_type = opts[:debug_return_type] || 'ApprovalRequestResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.post_approval_request_review", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#post_approval_request_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_approval_request_with_http_info(create_approval_request_request, opts = {}) ⇒ Array<(ApprovalRequestResponse, Integer, Hash)>
Create approval request Create an approval request. This endpoint requires a list of `instructions`, in semantic patch format, that will be applied when the approval request is approved and applied. ### Flags If you are creating an approval request for a flag, you can use the following `instructions`: - `addVariation` - `removeVariation` - `updateVariation` - `updateDefaultVariation` For details on using these instructions, read Update feature flag. To create an approval for a flag specific to an environment, use Create approval request for a flag. ### AgentControl If you are creating an approval request for an AgentControl config, you can use the semantic patch instructions listed under Update config targeting. ### Segments If you are creating an approval request for a segment, you can use the semantic patch instructions listed under Patch segment.
472 473 474 475 476 477 478 479 480 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/approvals_api.rb', line 472 def post_approval_request_with_http_info(create_approval_request_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.post_approval_request ...' end # verify the required parameter 'create_approval_request_request' is set if @api_client.config.client_side_validation && create_approval_request_request.nil? fail ArgumentError, "Missing the required parameter 'create_approval_request_request' when calling ApprovalsApi.post_approval_request" end # resource path local_var_path = '/api/v2/approval-requests' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_approval_request_request) # return_type return_type = opts[:debug_return_type] || 'ApprovalRequestResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.post_approval_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#post_approval_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_flag_copy_config_approval_request(project_key, feature_flag_key, environment_key, create_copy_flag_config_approval_request_request, opts = {}) ⇒ FlagConfigApprovalRequestResponse
Create approval request to copy flag configurations across environments Create an approval request to copy a feature flag's configuration across environments.
951 952 953 954 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 951 def post_flag_copy_config_approval_request(project_key, feature_flag_key, environment_key, create_copy_flag_config_approval_request_request, opts = {}) data, _status_code, _headers = post_flag_copy_config_approval_request_with_http_info(project_key, feature_flag_key, environment_key, create_copy_flag_config_approval_request_request, opts) data end |
#post_flag_copy_config_approval_request_with_http_info(project_key, feature_flag_key, environment_key, create_copy_flag_config_approval_request_request, opts = {}) ⇒ Array<(FlagConfigApprovalRequestResponse, Integer, Hash)>
Create approval request to copy flag configurations across environments Create an approval request to copy a feature flag's configuration across environments.
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 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'lib/launchdarkly_api/api/approvals_api.rb', line 964 def post_flag_copy_config_approval_request_with_http_info(project_key, feature_flag_key, environment_key, create_copy_flag_config_approval_request_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApprovalsApi.post_flag_copy_config_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 ApprovalsApi.post_flag_copy_config_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 ApprovalsApi.post_flag_copy_config_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 ApprovalsApi.post_flag_copy_config_approval_request" end # verify the required parameter 'create_copy_flag_config_approval_request_request' is set if @api_client.config.client_side_validation && create_copy_flag_config_approval_request_request.nil? fail ArgumentError, "Missing the required parameter 'create_copy_flag_config_approval_request_request' when calling ApprovalsApi.post_flag_copy_config_approval_request" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_copy_flag_config_approval_request_request) # return_type return_type = opts[:debug_return_type] || 'FlagConfigApprovalRequestResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ApprovalsApi.post_flag_copy_config_approval_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApprovalsApi#post_flag_copy_config_approval_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |