lib/datadog_api_client/v2/api/key_management_api.rb
# Get all application keys owned by current user
# List all application keys available for current user
# @param opts [Hash] the optional parameters
# @option opts [Integer] :page_size Size for a given page.
# @option opts [Integer] :page_number Specific page number to return.
# @option opts [ApplicationKeysSort] :sort Application key attribute used to sort results. Sort order is ascending by default. In order to specify a descending sort, prefix the attribute with a minus sign.
# @option opts [String] :filter Filter application keys by the specified string.
# @option opts [String] :filter_created_at_start Only include application keys created on or after the specified date.
# @option opts [String] :filter_created_at_end Only include application keys created on or before the specified date.
# @return [Array<(ListApplicationKeysResponse, Integer, Hash)>] ListApplicationKeysResponse data, response status code and response headers
Get all application keys owned by current user
List all application keys available for current user
Get all application keys owned by current user List all application keys available for current user
def list_current_user_application_keys_with_http_info(opts = {})
      if @api_client.config.unstable_operations.has_key?(:list_current_user_application_keys)
        unstable_enabled = @api_client.config.unstable_operations[:list_current_user_application_keys]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "list_current_user_application_keys")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_current_user_application_keys"))
        end
      end
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: KeyManagementAPI.list_current_user_application_keys ...'
      end
      allowable_values = ['created_at', '-created_at', 'last4', '-last4', '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
      local_var_path = '/api/v2/current_user/application_keys'
      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?
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body]
      return_type = opts[:debug_return_type] || 'ListApplicationKeysResponse'
      auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
      new_options = opts.merge(
        :operation => :list_current_user_application_keys,
        :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, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: KeyManagementAPI#list_current_user_application_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def list_current_user_application_keys_with_http_info ( opts = { } ) if @api_client . config . unstable_operations . has_key? ( :list_current_user_application_keys ) unstable_enabled = @api_client . config . unstable_operations [ :list_current_user_application_keys ] if unstable_enabled @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "list_current_user_application_keys" ) else raise APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "list_current_user_application_keys" ) ) end end if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: KeyManagementAPI.list_current_user_application_keys ...' end allowable_values = [ 'created_at' , '-created_at' , 'last4' , '-last4' , '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 local_var_path = '/api/v2/current_user/application_keys' 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? header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] return_type = opts [ :debug_return_type ] || 'ListApplicationKeysResponse' auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ] new_options = opts . merge ( :operation => :list_current_user_application_keys , :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 , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: KeyManagementAPI#list_current_user_application_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Get all application keys owned by current user
List all application keys available for current user
Get all application keys owned by current user List all application keys available for current user
# resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
ListApplicationKeysResponse data, response status code and response headers
ListApplicationKeysResponse data response status code and response headers
Array<(ListApplicationKeysResponse, Integer, Hash)>
opts
:filter_created_at_end Only include application keys created on or before the specified date.
: filter_created_at_end Only include application keys created on or before the specified date .