OpenXchangeClient.Api.Config (open_xchange_client v0.10.1)

API calls for all endpoints tagged Config.

Link to this section Summary

Functions

Gets data of a configuration node. The configuration is stored in a tree. Each node of the tree has a name and a value. The values of leaf nodes are strings which store the actual configuration data. The values of inner nodes are defined recursively as objects with one field for each child node. The name and the value of each field is the name and the value of the corresponding child node, respectively.

Gets a property of the configuration.

Sets the value of a configuration node. The configuration is stored in a tree. Each node of the tree has a name and a value. The values of leaf nodes are strings which store the actual configuration data. The values of inner nodes are defined recursively as objects with one field for each child node. The name and the value of each field is the name and the value of the corresponding child node, respectively.

Link to this section Functions

Link to this function

get_config_node(connection, path, session, opts \\ [])

@spec get_config_node(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, OpenXchangeClient.Model.ConfigResponse.t()} | {:error, Tesla.Env.t()}

Gets data of a configuration node. The configuration is stored in a tree. Each node of the tree has a name and a value. The values of leaf nodes are strings which store the actual configuration data. The values of inner nodes are defined recursively as objects with one field for each child node. The name and the value of each field is the name and the value of the corresponding child node, respectively.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • path (String.t): The path to the node.
  • session (String.t): A session ID previously obtained from the login module.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

get_config_property(connection, session, name, opts \\ [])

@spec get_config_property(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, OpenXchangeClient.Model.ConfigPropertyResponse.t()}
  | {:error, Tesla.Env.t()}

Gets a property of the configuration.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • name (String.t): The name of the property to return.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

put_config_node(connection, path, session, body, opts \\ [])

Sets the value of a configuration node. The configuration is stored in a tree. Each node of the tree has a name and a value. The values of leaf nodes are strings which store the actual configuration data. The values of inner nodes are defined recursively as objects with one field for each child node. The name and the value of each field is the name and the value of the corresponding child node, respectively.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • path (String.t): The path to the node.
  • session (String.t): A session ID previously obtained from the login module.
  • body (ConfigBody): A JSON object containing the value of the config node.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

set_config_property(connection, session, name, body, opts \\ [])

Sets a property of the configuration.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • name (String.t): The name of the property to return.
  • body (ConfigPropertyBody): A JSON object providing the value to set (Example: {"value":"test123"}).
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure