Module: Elasticsearch::XPack::API::Security::Actions

Included in:
SecurityClient
Defined in:
lib/elasticsearch/xpack/api/namespace/security.rb,
lib/elasticsearch/xpack/api/actions/security/get_role.rb,
lib/elasticsearch/xpack/api/actions/security/get_user.rb,
lib/elasticsearch/xpack/api/actions/security/put_role.rb,
lib/elasticsearch/xpack/api/actions/security/put_user.rb,
lib/elasticsearch/xpack/api/actions/security/get_token.rb,
lib/elasticsearch/xpack/api/actions/security/delete_role.rb,
lib/elasticsearch/xpack/api/actions/security/delete_user.rb,
lib/elasticsearch/xpack/api/actions/security/enable_user.rb,
lib/elasticsearch/xpack/api/actions/security/get_api_key.rb,
lib/elasticsearch/xpack/api/actions/security/authenticate.rb,
lib/elasticsearch/xpack/api/actions/security/disable_user.rb,
lib/elasticsearch/xpack/api/actions/security/create_api_key.rb,
lib/elasticsearch/xpack/api/actions/security/get_privileges.rb,
lib/elasticsearch/xpack/api/actions/security/has_privileges.rb,
lib/elasticsearch/xpack/api/actions/security/put_privileges.rb,
lib/elasticsearch/xpack/api/actions/security/change_password.rb,
lib/elasticsearch/xpack/api/actions/security/get_role_mapping.rb,
lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb,
lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb,
lib/elasticsearch/xpack/api/actions/security/delete_privileges.rb,
lib/elasticsearch/xpack/api/actions/security/clear_cached_roles.rb,
lib/elasticsearch/xpack/api/actions/security/invalidate_api_key.rb,
lib/elasticsearch/xpack/api/actions/security/clear_cached_realms.rb,
lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb,
lib/elasticsearch/xpack/api/actions/security/get_user_privileges.rb

Instance Method Summary collapse

Instance Method Details

#authenticate(arguments = {}) ⇒ Object

Retrieve details about the currently authenticated user



28
29
30
31
32
33
34
35
36
# File 'lib/elasticsearch/xpack/api/actions/security/authenticate.rb', line 28

def authenticate(arguments={})
  valid_params = []
  method = Elasticsearch::API::HTTP_GET
  path   = "_xpack/security/_authenticate"
  params = {}
  body   = nil

  perform_request(method, path, params, body).body
end

#change_password(arguments = {}) ⇒ Object

Change the password of a user

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :username (String)

    The username of the user to change the password for

  • :body (Hash)

    the new password for the user (Required)

  • :refresh (Boolean)

    Refresh the index after performing the operation

Raises:

  • (ArgumentError)

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/elasticsearch/xpack/api/actions/security/change_password.rb', line 32

def change_password(arguments={})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  valid_params = [ :refresh ]

  arguments = arguments.clone
  username = arguments.delete(:username)

  method = Elasticsearch::API::HTTP_PUT
  path   = Elasticsearch::API::Utils.__pathify "_xpack/security/user/", username, "/_password"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = arguments[:body]

  perform_request(method, path, params, body).body
end

#clear_cached_realms(arguments = {}) ⇒ Object

Clears the internal user caches for specified realms

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :realms (String)

    Comma-separated list of realms to clear (Required)

  • :usernames (String)

    Comma-separated list of usernames to clear from the cache

Raises:

  • (ArgumentError)

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/elasticsearch/xpack/api/actions/security/clear_cached_realms.rb', line 31

def clear_cached_realms(arguments={})
  raise ArgumentError, "Required argument 'realms' missing" unless arguments[:realms]

  valid_params = [ :usernames ]

  arguments = arguments.clone
  realms = arguments.delete(:realms)

  method = Elasticsearch::API::HTTP_POST
  path   = Elasticsearch::API::Utils.__pathify "_xpack/security/realm/", Elasticsearch::API::Utils.__listify(realms), "_clear_cache"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = nil

  perform_request(method, path, params, body).body
end

#clear_cached_roles(arguments = {}) ⇒ Object

Clears the internal caches for specified roles

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    Role name (Required)

Raises:

  • (ArgumentError)

See Also:



30
31
32
33
34
35
36
37
38
39
# File 'lib/elasticsearch/xpack/api/actions/security/clear_cached_roles.rb', line 30

def clear_cached_roles(arguments={})
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]

  method = Elasticsearch::API::HTTP_PUT
  path   = "_xpack/security/role/#{arguments[:name]}/_clear_cache"
  params = {}
  body   = nil

  perform_request(method, path, params, body).body
end

#create_api_key(arguments = {}) ⇒ Object

Creates an API key for access without requiring basic authentication.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :refresh (String)

    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.

  • :body (Hash)

    The api key request to create an API key. (Required)

Raises:

  • (ArgumentError)

See Also:



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/elasticsearch/xpack/api/actions/security/create_api_key.rb', line 34

def create_api_key(arguments={})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  valid_params = [ :refresh ]

  method = Elasticsearch::API::HTTP_PUT
  path   = "_security/api_key"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params

  perform_request(method, path, params, arguments[:body]).body
end

#delete_privileges(arguments = {}) ⇒ Object

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :application (String)

    Application name (Required)

  • :name (Boolean)

    Privilege name (Required)

Raises:

  • (ArgumentError)


10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/elasticsearch/xpack/api/actions/security/delete_privileges.rb', line 10

def delete_privileges(arguments={})
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
  raise ArgumentError, "Required argument 'application' missing" unless arguments[:application]

  valid_params = [ :refresh ]

  method = Elasticsearch::API::HTTP_DELETE
  path   = "_xpack/security/privilege/#{arguments.delete(:application)}/#{arguments[:name]}"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = nil

  perform_request(method, path, params, body).body
end

#delete_role(arguments = {}) ⇒ Object

Remove a role from the native realm

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    Role name (Required)

  • :refresh (Boolean)

    Refresh the index after performing the operation

Raises:

  • (ArgumentError)

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/elasticsearch/xpack/api/actions/security/delete_role.rb', line 31

def delete_role(arguments={})
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]

  valid_params = [ :refresh ]

  method = Elasticsearch::API::HTTP_DELETE
  path   = "_xpack/security/role/#{arguments[:name]}"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = nil

  if Array(arguments[:ignore]).include?(404)
    Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
  else
    perform_request(method, path, params, body).body
  end
end

#delete_role_mapping(arguments = {}) ⇒ Object

Delete a role mapping

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    Role-mapping name (Required)

  • :refresh (String)

    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)

Raises:

  • (ArgumentError)

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb', line 31

def delete_role_mapping(arguments={})
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
  valid_params = [
    :name,
    :refresh ]

  arguments = arguments.clone
  name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_DELETE
  path   = "_xpack/security/role_mapping/#{name}"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = nil

  perform_request(method, path, params, body).body
end

#delete_user(arguments = {}) ⇒ Object

Remove a user from the native realm

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :username (String)

    username (Required)

  • :refresh (Boolean)

    Refresh the index after performing the operation

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/elasticsearch/xpack/api/actions/security/delete_user.rb', line 31

def delete_user(arguments={})
  valid_params = [
    :username,
    :refresh ]

  arguments = arguments.clone
  username  = arguments.delete(:username)

  method = Elasticsearch::API::HTTP_DELETE
  path   = "_xpack/security/user/#{username}"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = nil

  if Array(arguments[:ignore]).include?(404)
    Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
  else
    perform_request(method, path, params, body).body
  end
end

#disable_user(arguments = {}) ⇒ Object

Disable a user

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :username (String)

    The username of the user to disable

  • :refresh (String)

    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)

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/elasticsearch/xpack/api/actions/security/disable_user.rb', line 31

def disable_user(arguments={})
  valid_params = [
    :username,
    :refresh ]

  arguments = arguments.clone
  username = arguments.delete(:username)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_xpack/security/user/#{username}/_disable"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = nil

  perform_request(method, path, params, body).body
end

#enable_user(arguments = {}) ⇒ Object

Enable a user

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :username (String)

    The username of the user to enable

  • :refresh (String)

    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)

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/elasticsearch/xpack/api/actions/security/enable_user.rb', line 31

def enable_user(arguments={})
  valid_params = [
    :username,
    :refresh ]

  arguments = arguments.clone
  username = arguments.delete(:username)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_xpack/security/user/#{username}/_enable"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = nil

  perform_request(method, path, params, body).body
end

#get_api_key(arguments = {}) ⇒ Object

Creates an API key for access without requiring basic authentication.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    API key id of the API key to be retrieved.

  • :name (String)

    API key name of the API key to be retrieved.

  • :username (String)

    user name of the user who created this API key to be retrieved.

  • :realm_name (String)

    realm name of the user who created this API key to be retrieved.

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/elasticsearch/xpack/api/actions/security/get_api_key.rb', line 36

def get_api_key(arguments={})

  valid_params = [ :id,
                   :name,
                   :username,
                   :realm_name ]

  method = Elasticsearch::API::HTTP_GET
  path   = "_security/api_key"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params

  perform_request(method, path, params).body
end

#get_privileges(arguments = {}) ⇒ Object

Retrieve one or more roles from the native realm

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    Role name

See Also:



13
14
15
16
17
18
19
20
21
22
# File 'lib/elasticsearch/xpack/api/actions/security/get_privileges.rb', line 13

def get_privileges(arguments={})
  method = Elasticsearch::API::HTTP_GET
  path   = Elasticsearch::API::Utils.__pathify "_xpack/security/privilege",
                                               arguments[:application],
                                               Elasticsearch::API::Utils.__listify(arguments[:name])
  params = {}
  body   = nil

  perform_request(method, path, params, body).body
end

#get_role(arguments = {}) ⇒ Object

Retrieve one or more roles from the native realm

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    Role name

See Also:



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/elasticsearch/xpack/api/actions/security/get_role.rb', line 30

def get_role(arguments={})
  method = Elasticsearch::API::HTTP_GET
  path   = Elasticsearch::API::Utils.__pathify "_xpack/security/role", Elasticsearch::API::Utils.__listify(arguments[:name])
  params = {}
  body   = nil

  if Array(arguments[:ignore]).include?(404)
    Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
  else
    perform_request(method, path, params, body).body
  end
end

#get_role_mapping(arguments = {}) ⇒ Object

Retrieve the mapping for a role

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    Role-Mapping name

See Also:



30
31
32
33
34
35
36
37
# File 'lib/elasticsearch/xpack/api/actions/security/get_role_mapping.rb', line 30

def get_role_mapping(arguments={})
  method = Elasticsearch::API::HTTP_GET
  path   = "_xpack/security/role_mapping/#{Elasticsearch::API::Utils.__listify(arguments[:name])}"
  params = {}
  body   = nil

  perform_request(method, path, params, body).body
end

#get_token(arguments = {}) ⇒ Object

Obtain a token for OAuth 2.0 auhentication

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    The token request to get (Required)

Raises:

  • (ArgumentError)

See Also:



30
31
32
33
34
35
36
37
38
# File 'lib/elasticsearch/xpack/api/actions/security/get_token.rb', line 30

def get_token(arguments={})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
  method = Elasticsearch::API::HTTP_POST
  path   = "_xpack/security/oauth2/token"
  params = {}
  body   = arguments[:body]

  perform_request(method, path, params, body).body
end

#get_user(arguments = {}) ⇒ Object

Retrieve one or more users from the native realm

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :username (List)

    A comma-separated list of usernames

See Also:



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/elasticsearch/xpack/api/actions/security/get_user.rb', line 30

def get_user(arguments={})
  method = Elasticsearch::API::HTTP_GET
  path   = Elasticsearch::API::Utils.__pathify "_xpack/security/user", Elasticsearch::API::Utils.__listify(arguments[:username])
  params = {}
  body   = nil

  if Array(arguments[:ignore]).include?(404)
    Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
  else
    perform_request(method, path, params, body).body
  end
end

#get_user_privileges(arguments = {}) ⇒ Object

Get user privileges



9
10
11
12
13
14
15
# File 'lib/elasticsearch/xpack/api/actions/security/get_user_privileges.rb', line 9

def get_user_privileges(arguments={})
  method = Elasticsearch::API::HTTP_GET
  params = {}
  body   = nil

  perform_request(method, '_xpack/security/user/_privileges', params, body).body
end

#has_privileges(arguments = {}) ⇒ Object

Remove a role from the native realm

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :user (String)

    Username

  • :body (String)

    The privileges to test (Required)

Raises:

  • (ArgumentError)

See Also:



14
15
16
17
18
19
20
21
22
# File 'lib/elasticsearch/xpack/api/actions/security/has_privileges.rb', line 14

def has_privileges(arguments={})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  method = Elasticsearch::API::HTTP_GET

  path   = Elasticsearch::API::Utils.__pathify "_xpack/security/user", arguments[:user], "_has_privileges"

  perform_request(method, path, {}, arguments[:body]).body
end

#invalidate_api_key(arguments = {}) ⇒ Object

Creates an API key for access without requiring basic authentication.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    The api key request to invalidate API key(s). (Required)

Raises:

  • (ArgumentError)

See Also:



30
31
32
33
34
35
36
37
38
# File 'lib/elasticsearch/xpack/api/actions/security/invalidate_api_key.rb', line 30

def invalidate_api_key(arguments={})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  method = Elasticsearch::API::HTTP_DELETE
  path   = "_security/api_key"
  params = {}

  perform_request(method, path, params, arguments[:body]).body
end

#invalidate_token(arguments = {}) ⇒ Object

Delete a token for OAuth 2.0 auhentication

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    The token to invalidate (Required)

Raises:

  • (ArgumentError)

See Also:



30
31
32
33
34
35
36
37
38
# File 'lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb', line 30

def invalidate_token(arguments={})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
  method = Elasticsearch::API::HTTP_DELETE
  path   = "_xpack/security/oauth2/token"
  params = {}
  body   = arguments[:body]

  perform_request(method, path, params, body).body
end

#put_privileges(arguments = {}) ⇒ Object

Add a privilege

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    The privilege(s) to add (Required)

  • :refresh (Boolean)

    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.

Raises:

  • (ArgumentError)


13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/elasticsearch/xpack/api/actions/security/put_privileges.rb', line 13

def put_privileges(arguments={})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  valid_params = [ :refresh ]

  method = Elasticsearch::API::HTTP_PUT
  path   = "_xpack/security/privilege"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = arguments[:body]

  perform_request(method, path, params, body).body
end

#put_role(arguments = {}) ⇒ Object

Update or create a role for the native shield realm

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    Role name (Required)

  • :body (Hash)

    The role to add (Required)

  • :refresh (Boolean)

    Refresh the index after performing the operation

Raises:

  • (ArgumentError)

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/elasticsearch/xpack/api/actions/security/put_role.rb', line 32

def put_role(arguments={})
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  valid_params = [ :refresh ]

  method = Elasticsearch::API::HTTP_PUT
  path   = "_xpack/security/role/#{arguments[:name]}"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = arguments[:body]

  perform_request(method, path, params, body).body
end

#put_role_mapping(arguments = {}) ⇒ Object

Add a mapping for a role

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    Role-mapping name (Required)

  • :body (Hash)

    The role to add (Required)

  • :refresh (String)

    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)

Raises:

  • (ArgumentError)

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb', line 32

def put_role_mapping(arguments={})
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
  valid_params = [
    :name,
    :refresh ]

  arguments = arguments.clone
  name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_xpack/security/role_mapping/#{name}"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = arguments[:body]

  perform_request(method, path, params, body).body
end

#put_user(arguments = {}) ⇒ Object

Update or create a user for the native realm

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :username (String)

    The username of the User (Required)

  • :body (Hash)

    The user to add (Required)

  • :refresh (Boolean)

    Refresh the index after performing the operation

Raises:

  • (ArgumentError)

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elasticsearch/xpack/api/actions/security/put_user.rb', line 32

def put_user(arguments={})
  raise ArgumentError, "Required argument 'username' missing" unless arguments[:username]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  valid_params = [ :refresh ]

  arguments = arguments.clone
  username = arguments.delete(:username)

  method = Elasticsearch::API::HTTP_PUT
  path   = Elasticsearch::API::Utils.__pathify "_xpack/security/user", username
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = arguments[:body]

  perform_request(method, path, params, body).body
end