# Is the extended tag path format for history queries documented?

**URL:** <https://forum.inductiveautomation.com/t/is-the-extended-tag-path-format-for-history-queries-documented/96730>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 2, 2024, 7:08pm UTC](https://forum.inductiveautomation.com/t/is-the-extended-tag-path-format-for-history-queries-documented/96730 "2024-10-02T19:08:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [October 2, 2024, 7:08pm UTC](https://forum.inductiveautomation.com/t/is-the-extended-tag-path-format-for-history-queries-documented/96730/1 "2024-10-02T19:08:15Z")

</div>

I was doing some hackish things with a history DB, and landed in a situation where I could no longer see the history for one specific tag using `system.tag.queryTagHistory`. Just to make sure I wasn't fumbling a parameter, I tried a history binding in Perspective for the same tag and it worked.

Then I noticed that the designer UI had built the tag path in a form I've never seen documented. I tried that path with `queryTagHistory` and it got data.

I was using a more simple:

```python
my_hist = system.tag.queryTagHistory(['[default]some_folder/foo'])

```

And the designer UI came up with this tag path:

```python
my_hist = system.tag.queryTagHistory(['[db_name/gateway_name:default]some_folder/foo'])

```

I get why this longer form could be necessary and even why I needed it in my case. I'm just here to complain that I've never seen this form of tag path documented anywhere. The [manual page for queryTagHistory](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-tag/system-tag-queryTagHistory) doesn't mention it, nor does the [manual page it links to specifically about tag paths](https://www.docs.inductiveautomation.com/docs/8.1/platform/tags/tag-paths). It's also not like the [special history paths](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/tag-historian/tag-history-providers/db-table-historian-provider#path-components) mentioned in the historian docs.

Is this format somewhere else in the manual? Should it be? Is it "safe" to use or likely to break in a future update?

---

<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:** [October 2, 2024, 7:31pm UTC](https://forum.inductiveautomation.com/t/is-the-extended-tag-path-format-for-history-queries-documented/96730/2 "2024-10-02T19:31:53Z")

</div>

Brief description here:

> [@Historian Tag Path Syntax Format](https://forum.inductiveautomation.com/t/historian-tag-path-syntax-format/94617):
>
> I am laying out some foundational work. I came across two valid syntax of Historian Tag Path: short version: DB\_GW\_A01/gw\_maker:default]wm01 long version: histprov:DB\_GW\_A01:/drv:gw\_maker:default:/tag:wm01 From your experience. Which one is more acceptable?

The form you show is how you use Ignition's `TagPath` objects to escape the implicit history provider defaults for a given tag provider. The "long form" linked is what you get when using Ignition's more modern `QualifiedPath` objects.

Note that `db_name` should really be `hist_prov_name`, as it could be a 3rd party historian.

And yeah, the docs are terrible on this subject.

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [October 2, 2024, 7:52pm UTC](https://forum.inductiveautomation.com/t/is-the-extended-tag-path-format-for-history-queries-documented/96730/3 "2024-10-02T19:52:16Z")

</div>

Just confirming my misbehaving tag also works fine when I query like this:

```python
my_hist = system.tag.queryTagHistory(['histprov:db_name:/drv:gateway_name:default:/tag:some_folder/foo'])

```

Still using `db_name` so it matches my earlier example, although I see how it more accurately is a history provider name...
