Miosa.Analytics (Miosa v1.0.0)

Copy Markdown View Source

Analytics — admin-scoped overview and timeseries metrics.

Requires an admin (msk_a_ / msk_p_) key.

Example

client = Miosa.client(System.fetch_env!("MIOSA_ADMIN_KEY"))

{:ok, overview} = Miosa.Analytics.overview(client)
{:ok, ts} = Miosa.Analytics.timeseries(client, %{metric: "computers", period: "7d"})

Summary

Functions

Get the platform analytics overview.

Get a timeseries for a metric over a period.

Functions

overview(client, filters \\ [])

@spec overview(Miosa.Client.t(), keyword() | map()) :: Miosa.Client.result(map())

Get the platform analytics overview.

Accepts optional filters as a keyword list or map (e.g. :period, :tenant_id).

timeseries(client, filters \\ [])

@spec timeseries(Miosa.Client.t(), keyword() | map()) :: Miosa.Client.result(map())

Get a timeseries for a metric over a period.

Common options: :metric (e.g. "computers"), :period (e.g. "7d"). Accepts any additional filters supported by the API.