Method: Falcon::InstallationTokensApi#tokens_update_with_http_info
- Defined in:
- lib/crimson-falcon/api/installation_tokens_api.rb
#tokens_update_with_http_info(ids, body, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Updates one or more tokens. Use this endpoint to edit labels, change expiration, revoke, or restore.
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 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 |
# File 'lib/crimson-falcon/api/installation_tokens_api.rb', line 487 def tokens_update_with_http_info(ids, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InstallationTokensApi.tokens_update ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling InstallationTokensApi.tokens_update" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling InstallationTokensApi.tokens_update" end # resource path local_var_path = '/installation-tokens/entities/tokens/v1' # query parameters query_params = opts[:query_params] || {} query_params[:'ids'] = @api_client.build_collection_param(ids, :csv) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # 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(body) # return_type return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"InstallationTokensApi.tokens_update", :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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InstallationTokensApi#tokens_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |