elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb
def create_api_key(arguments = {})
          raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

          headers = arguments.delete(:headers) || {}

          body = arguments.delete(:body)

          arguments = arguments.clone

          method = Elasticsearch::API::HTTP_PUT
          path   = "_security/api_key"
          params = Utils.process_params(arguments)

          perform_request(method, path, params, body, headers).body
        end
# Creates an API key for access without requiring basic authentication.
#
# @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for)
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The api key request to create an API key (*Required*)
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
#
Creates an API key for access without requiring basic authentication.
Creates an API key for access without requiring basic authentication .
def create_api_key(arguments = {})
          raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
          headers = arguments.delete(:headers) || {}
          body = arguments.delete(:body)
          arguments = arguments.clone
          method = Elasticsearch::API::HTTP_PUT
          path   = "_security/api_key"
          params = Utils.process_params(arguments)
          perform_request(method, path, params, body, headers).body
        end
def create_api_key ( arguments = { } ) raise ArgumentError , "Required argument 'body' missing" unless arguments [ :body ] headers = arguments . delete ( :headers ) || { } body = arguments . delete ( :body ) arguments = arguments . clone method = Elasticsearch :: API :: HTTP_PUT path = "_security/api_key" params = Utils . process_params ( arguments ) perform_request ( method , path , params , body , headers ) . body end
Creates an API key for access without requiring basic authentication.
Creates an API key for access without requiring basic authentication .
arguments
:body The api key request to create an API key (*Required*)
: body The api key request to create an API key ( * Required * )
see
None