v3 token management via /api/v3/configure/token.
Delegates to the configured InfluxElixir.Client implementation.
Use this module to create and delete API tokens in InfluxDB v3.
Examples
{:ok, conn} = InfluxElixir.Client.Local.start()
{:ok, token} = InfluxElixir.Admin.Tokens.create(conn, "my token")
:ok = InfluxElixir.Admin.Tokens.delete(conn, token["id"])
Summary
Functions
@spec create(InfluxElixir.Client.connection(), binary(), keyword()) :: {:ok, map()} | {:error, term()}
Creates an API token in InfluxDB v3.
Parameters
connection- a client connection termdescription- human-readable description for the tokenopts- optional keyword list (e.g.:permissions)
Returns
{:ok, map()}containing token details on success{:error, reason}on failure
@spec delete(InfluxElixir.Client.connection(), binary()) :: :ok | {:error, term()}
Deletes an API token in InfluxDB v3.
Parameters
connection- a client connection termtoken_id- the ID of the token to delete
Returns
:okon success{:error, reason}on failure