View Source Radixir.System.API (radixir v0.0.3)

Submits requests to System API.

Link to this section Summary

Functions

Submits request to /system/addressbook.

Submits request to /system/configuration.

Submits request to /system/health.

Submits request to /system/metrics.

Submits request to /system/peers.

Submits request to /prometheus/metrics.

Submits request to /system/version.

Link to this section Types

Specs

options() :: keyword()

Link to this section Functions

Link to this function

get_address_book(options \\ [])

View Source

Specs

get_address_book(options()) :: {:ok, map()} | {:error, map()}

Submits request to /system/addressbook.

Parameters

  • options: Keyword list that contains
    • url (optional, string): If url is not found in options then the url set in the configs will be used.
    • auth_index (optional, string): auth_index is the index of the username + password combo to be used for endpoint authentication.
    • username: (optional, string): username to be used for endpoint authentication.
    • password: (optional, string): password to be used for endpoint authentication.

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

Example

If the following usernames and passwords are exported:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then passing auth_index: 0 would lead to admin being used as the username and funny cats very Jack 21! being used as the password for endpoint authentication.

System API Documentation

Link to this function

get_configuration(options \\ [])

View Source

Specs

get_configuration(options()) :: {:ok, map()} | {:error, map()}

Submits request to /system/configuration.

Parameters

  • options: Keyword list that contains
    • url (optional, string): If url is not found in options then the url set in the configs will be used.
    • auth_index (optional, string): auth_index is the index of the username + password combo to be used for endpoint authentication.
    • username: (optional, string): username to be used for endpoint authentication.
    • password: (optional, string): password to be used for endpoint authentication.

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

Example

If the following usernames and passwords are exported:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then passing auth_index: 0 would lead to admin being used as the username and funny cats very Jack 21! being used as the password for endpoint authentication.

System API Documentation

Link to this function

get_health(options \\ [])

View Source

Specs

get_health(options()) :: {:ok, map()} | {:error, map()}

Submits request to /system/health.

Parameters

  • options: Keyword list that contains
    • url (optional, string): If url is not found in options then the url set in the configs will be used.
    • auth_index (optional, string): auth_index is the index of the username + password combo to be used for endpoint authentication.
    • username: (optional, string): username to be used for endpoint authentication.
    • password: (optional, string): password to be used for endpoint authentication.

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

Example

If the following usernames and passwords are exported:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then passing auth_index: 0 would lead to admin being used as the username and funny cats very Jack 21! being used as the password for endpoint authentication.

System API Documentation

Link to this function

get_metrics(options \\ [])

View Source

Specs

get_metrics(options()) :: {:ok, map()} | {:error, map()}

Submits request to /system/metrics.

Parameters

  • options: Keyword list that contains
    • url (optional, string): If url is not found in options then the url set in the configs will be used.
    • auth_index (optional, string): auth_index is the index of the username + password combo to be used for endpoint authentication.
    • username: (optional, string): username to be used for endpoint authentication.
    • password: (optional, string): password to be used for endpoint authentication.

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

Example

If the following usernames and passwords are exported:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then passing auth_index: 0 would lead to admin being used as the username and funny cats very Jack 21! being used as the password for endpoint authentication.

System API Documentation

Link to this function

get_peers(options \\ [])

View Source

Specs

get_peers(options()) :: {:ok, map()} | {:error, map()}

Submits request to /system/peers.

Parameters

  • options: Keyword list that contains
    • url (optional, string): If url is not found in options then the url set in the configs will be used.
    • auth_index (optional, string): auth_index is the index of the username + password combo to be used for endpoint authentication.
    • username: (optional, string): username to be used for endpoint authentication.
    • password: (optional, string): password to be used for endpoint authentication.

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

Example

If the following usernames and passwords are exported:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then passing auth_index: 0 would lead to admin being used as the username and funny cats very Jack 21! being used as the password for endpoint authentication.

System API Documentation

Link to this function

get_prometheus_metrics(options \\ [])

View Source

Specs

get_prometheus_metrics(options()) :: {:ok, map()} | {:error, map()}

Submits request to /prometheus/metrics.

Parameters

  • options: Keyword list that contains
    • url (optional, string): If url is not found in options then the url set in the configs will be used.
    • auth_index (optional, string): auth_index is the index of the username + password combo to be used for endpoint authentication.
    • username: (optional, string): username to be used for endpoint authentication.
    • password: (optional, string): password to be used for endpoint authentication.

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

Example

If the following usernames and passwords are exported:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then passing auth_index: 0 would lead to admin being used as the username and funny cats very Jack 21! being used as the password for endpoint authentication.

System API Documentation

Link to this function

get_version(options \\ [])

View Source

Specs

get_version(options()) :: {:ok, map()} | {:error, map()}

Submits request to /system/version.

Parameters

  • options: Keyword list that contains
    • url (optional, string): If url is not found in options then the url set in the configs will be used.
    • auth_index (optional, string): auth_index is the index of the username + password combo to be used for endpoint authentication.
    • username: (optional, string): username to be used for endpoint authentication.
    • password: (optional, string): password to be used for endpoint authentication.

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

Example

If the following usernames and passwords are exported:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then passing auth_index: 0 would lead to admin being used as the username and funny cats very Jack 21! being used as the password for endpoint authentication.

System API Documentation