# How to get the remote Historian and system for a remote tag

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-the-remote-historian-and-system-for-a-remote-tag/117968>\
**Category:** Ignition\
**Tags:** scripting, ignition83\
**Created:** [November 25, 2026, 3:41pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-remote-historian-and-system-for-a-remote-tag/117968 "2026-11-25T15:41:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielps1818](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@danielps1818](https://forum.inductiveautomation.com/u/danielps1818)\
**Post date:** [November 25, 2026, 3:41pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-remote-historian-and-system-for-a-remote-tag/117968/1 "2026-11-25T15:41:55Z")

</div>

Hi!  
Just want to share a bit of knowledge we have been dealing with.

We have a Front Gateway and _N number_ of backend gateways (this one are only used to connect via opc and to historize tags, no extra work).

We needed to get the historian data of the back end gateways to the front gateways. We made it so the remote providers use historian-database instead of the gateway network.

However, if you need to build a historian path (for a component like a powertable) like this one: `histprov:Historian01:/drv:ignition-gateway:prueba:/tag:test/tag` you would need to know the historian for that tag.

We found a way of doing this:

```python
# Returns all historians
historians = system.tag.browseHistoricalTags().getResults() # deprecated but no way of doing this in 8.3 version

historian_path = None
for hist in historians:
	# We get the path for that historian
	h = system.historian.browse(hist.getPath().toString()).getResults()[0]
	prov = h.getPath().toString()[len("histprov:"):(h.getPath().toString().index(":/"))]
	if prov == provider_for_the_tag.lower():
		historian_path = h.getPath().toString()
		break

```

In this way we are able to get the provider with the gateway data for a specific provider.  
This has some limitations so be careful!

Hope this help someone

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 25, 2026, 3:52pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-remote-historian-and-system-for-a-remote-tag/117968/2 "2026-11-25T15:52:27Z")

</div>

You might find this discussion helpful:

> [@Remote Tag Provider History Queries](https://forum.inductiveautomation.com/t/remote-tag-provider-history-queries/93632):
>
> I'm working on a couple tasks related to historians and history queries, and have encountered some behaviors of remote tag providers (RTPs) that have me stymied: There's no public way to retrieve the gateway name that a RTP is pointing at, nor any public way to retrieve the far end's real tag provider name. (Reflection has exposed com.inductiveautomation.ignition.gateway.tags.distributed.client.RemoteTagProvider and com.inductiveautomation.metro.api.ServerId to me, and a number of private fie…
