# How to programmatically read Historian connection status/metrics in 8.3 (Canary Historian connector)?

**URL:** <https://forum.inductiveautomation.com/t/how-to-programmatically-read-historian-connection-status-metrics-in-8-3-canary-historian-connector/116339>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 9, 2026, 7:57pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-historian-connection-status-metrics-in-8-3-canary-historian-connector/116339 "2026-07-09T19:57:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eliott\_Hernandez](https://avatars.discourse-cdn.com/v4/letter/e/77aa72/32.png) [@Eliott\_Hernandez](https://forum.inductiveautomation.com/u/Eliott_Hernandez)\
**Post date:** [July 9, 2026, 7:57pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-historian-connection-status-metrics-in-8-3-canary-historian-connector/116339/1 "2026-07-09T19:57:54Z")

</div>

Hi all,

I'm building a network/infrastructure status screen in Perspective (8.3.x) and I want to display the health of my historian connection — in my case a **Canary Historian** connection configured under Services → Historians.

The gateway UI already shows exactly what I need: on the Historian details page there's a **Status (RUNNING)** field plus runtime metrics like Query Call Count, Query rates, Storage Success/Failure counts and rates. I'd like to read that same status from a gateway-scoped script (or any supported mechanism) so I can poll it into my status screen.

What I've checked so far:

- **System tags** : under `[System]Gateway/` I see Database, OPC, Gateway Network, StoreAndForward, EAM, etc. — but nothing for Historians.
- **REST API (`/data/api/v1`)**: the OpenAPI docs expose the `historian-config` endpoints (Get Historian Config, List Historian Resources, etc.), but those return configuration only — no runtime status or metrics endpoints that I could find searching for "status" / "diagnostics" / "metrics".
- Current workaround: an end-to-end probe — `system.tag.queryTagHistory()` on a known historized tag with `returnSize=1` inside a try/except, polled every few seconds. It works and it actually validates the full query pipeline, but it depends on a specific process tag existing, which I'd rather avoid.

Questions:

1. Is there a supported way to read the historian connection **Status** (RUNNING/FAULTED/etc.) from scripting in 8.3 — something equivalent to `system.db.getConnectionInfo()` but for historian connections?
2. Are the runtime metrics shown on the Historian details page (query/storage rates) exposed anywhere accessible — system tags, REST endpoint, or the metrics dashboard backend?

Thanks in advanc

---

<div class="post-metadata">

**Author:** ![paul.longtine](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.longtine/32/10599_2.png) [@paul.longtine](https://forum.inductiveautomation.com/u/paul.longtine)\
**Post date:** [July 9, 2026, 8:17pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-historian-connection-status-metrics-in-8-3-canary-historian-connector/116339/2 "2026-07-09T20:17:21Z")

</div>

You mentioned a REST endpoint, the metrics dashboard backend polls `data/api/v1/metrics/metric/<metric_name>` by default. The available metrics are accessible via `data/api/v1/metrics/available`.

You could get the current throughput of a store+forward engine via `data/api/v1/metrics/metric/storeforward.<engine_name>.store-throughput` to get the current datapoint throughput. On any system, if it's not idle, it will be nonzero.

What are you specifically looking for? The store+forward engines have different queues, and one metric may not be the complete picture. You are likely going to find clarity in looking at multiple metrics to determine the overall health/progress of a historian.

---

<div class="post-metadata">

**Author:** ![Eliott\_Hernandez](https://avatars.discourse-cdn.com/v4/letter/e/77aa72/32.png) [@Eliott\_Hernandez](https://forum.inductiveautomation.com/u/Eliott_Hernandez)\
**Post date:** [July 9, 2026, 9:00pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-historian-connection-status-metrics-in-8-3-canary-historian-connector/116339/3 "2026-07-09T21:00:46Z")

</div>

Thanks Paul!

For now I'm specifically after the simplest piece: the **Status** shown on the Historians page (RUNNING / FAULTED / etc.) for a Canary Historian connection — basically the historian equivalent of `system.db.getConnectionInfo()` for database connections. The throughput/queue metrics are great context for a deeper health view later, but right now I just want to surface that connection state on a Perspective status screen.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/d/0d48ceabe93f261db5c8641c4ac7183cc93bca0d.png)

Two things I ran into while testing:

1. `GET /data/api/v1/metrics/available` returns 404 on my gateway (8.3.x). Is that route version-dependent, or does it live somewhere else?
2. Auth: I created an API key and calls come back **403** on `/data/api/v1/resources/find/...`. My gateway uses SSO (OIDC IdP) for roles, and the API key doesn't seem to carry any role beyond "Authenticated" — and the key's security levels aren't editable after creation. What's the minimum permission setup for a read-only API key to hit these routes when roles come from an IdP?

Thanks again!

---

<div class="post-metadata">

**Author:** ![paul.longtine](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.longtine/32/10599_2.png) [@paul.longtine](https://forum.inductiveautomation.com/u/paul.longtine)\
**Post date:** [July 9, 2026, 9:15pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-historian-connection-status-metrics-in-8-3-canary-historian-connector/116339/4 "2026-07-09T21:15:52Z")

</div>

To access these endpoints programmatically, I believe you'll have to set up an API Key.

The user manual should help with this: [API Documentation | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.3/platform/gateway/openapi)

---

<div class="post-metadata">

**Author:** ![paul.longtine](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.longtine/32/10599_2.png) [@paul.longtine](https://forum.inductiveautomation.com/u/paul.longtine)\
**Post date:** [July 9, 2026, 9:29pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-historian-connection-status-metrics-in-8-3-canary-historian-connector/116339/5 "2026-07-09T21:29:17Z")

</div>

If you're after the status exclusively, the endpoint `data/api/v1/resources/find/com.inductiveautomation.historian/historian-provider/<provider_name>`, if found, should return a `healthchecks` section that describes the current status.

The manual referenced above should also mention the `/openapi` endpoint, which is also very handy to discover/test the available endpoints. I strongly encourage setting up a local, low-stakes environment to see which endpoints you might actually need.

There may be a better way to do this without the need of the REST API through obtaining a handle on the GatewayContext via the Tag History Manager via the [getStatus](https://sdk.inductiveautomation.com/javadoc/ignition83/8.3.7/com/inductiveautomation/ignition/gateway/historian/TagHistoryManager.html#getStatus(java.lang.String)) function:

```python
from com.inductiveautomation.ignition.gateway import IgnitionGateway
context = IgnitionGateway.get()
tagHistoryManager = context.getTagHistoryManager()
providerStatus = tagHistoryManager.getStatus("<history provider name>")

```

Keep in mind the above snippet has to run in the Gateway scripting context, it won't work in the Designer scripting console.

---

<div class="post-metadata">

**Author:** ![Eliott\_Hernandez](https://avatars.discourse-cdn.com/v4/letter/e/77aa72/32.png) [@Eliott\_Hernandez](https://forum.inductiveautomation.com/u/Eliott_Hernandez)\
**Post date:** [July 9, 2026, 11:19pm UTC](https://forum.inductiveautomation.com/t/how-to-programmatically-read-historian-connection-status-metrics-in-8-3-canary-historian-connector/116339/6 "2026-07-09T23:19:30Z")

</div>

Thanks Paul, this worked perfectly — marking this as the solution.

For anyone finding this later, here's what ended up working for a **Canary Historian** connection on 8.3:

The `TagHistoryManager.getStatus()` approach was exactly what I needed. A couple of implementation notes:

1. As Paul warned, it only runs in the **Gateway scripting context** — but that includes Perspective binding transforms, which is where my status screen polls from. Works great there.
2. `getStatus()` returns a `ProfileStatus` object whose default string representation is just the object identity. Calling **`.getState()`** on it gives you the actual state — in my case it returns `Good` when the connection is running, and `Unknown` when the connection is disabled.

Final working snippet (project library, called from a binding transform):

python

```python
from com.inductiveautomation.ignition.gateway import IgnitionGateway

context = IgnitionGateway.get()
mgr = context.getTagHistoryManager()
status = mgr.getStatus("MyHistorianConnection")
state = str(status.getState()) # "Good", "Unknown", etc.

```

Tested by disabling/re-enabling the historian connection — the state change is picked up immediately.

Thanks again for the quick and thorough help!
