Method: DatadogAPIClient::V2::KeyManagementAPI#list_api_keys_with_http_info
- Defined in:
- lib/datadog_api_client/v2/api/key_management_api.rb
#list_api_keys_with_http_info(opts = {}) ⇒ Array<(APIKeysResponse, Integer, Hash)>
Get all API keys.
List all API keys available for your account.
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 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 |
# File 'lib/datadog_api_client/v2/api/key_management_api.rb', line 580 def list_api_keys_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: KeyManagementAPI.list_api_keys ...' end allowable_values = ['created_at', '-created_at', 'last4', '-last4', 'modified_at', '-modified_at', 'name', '-name'] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v2/api_keys' # query parameters query_params = opts[:query_params] || {} query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'filter[created_at][start]'] = opts[:'filter_created_at_start'] if !opts[:'filter_created_at_start'].nil? query_params[:'filter[created_at][end]'] = opts[:'filter_created_at_end'] if !opts[:'filter_created_at_end'].nil? query_params[:'filter[modified_at][start]'] = opts[:'filter_modified_at_start'] if !opts[:'filter_modified_at_start'].nil? query_params[:'filter[modified_at][end]'] = opts[:'filter_modified_at_end'] if !opts[:'filter_modified_at_end'].nil? query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? query_params[:'filter[remote_config_read_enabled]'] = opts[:'filter_remote_config_read_enabled'] if !opts[:'filter_remote_config_read_enabled'].nil? query_params[:'filter[category]'] = opts[:'filter_category'] if !opts[:'filter_category'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'APIKeysResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :list_api_keys, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: KeyManagementAPI#list_api_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |