# system.tag.browseHistoricalTags example of use?

**URL:** <https://forum.inductiveautomation.com/t/system-tag-browsehistoricaltags-example-of-use/9847>\
**Category:** Ignition\
**Created:** [March 27, 2015, 9:54am UTC](https://forum.inductiveautomation.com/t/system-tag-browsehistoricaltags-example-of-use/9847 "2015-03-27T09:54:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [March 27, 2015, 9:54am UTC](https://forum.inductiveautomation.com/t/system-tag-browsehistoricaltags-example-of-use/9847/1 "2015-03-27T09:54:34Z")

</div>

I’m looking for an example for the use of :  
system.tag.browseHistoricalTags

I try to obtain a list of all tag path of historical tag.

This function browse the tag database or historical table definition ???

---

<div class="post-metadata">

**Author:** ![sngeru](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@sngeru](https://forum.inductiveautomation.com/u/sngeru)\
**Post date:** [April 7, 2015, 6:55pm UTC](https://forum.inductiveautomation.com/t/system-tag-browsehistoricaltags-example-of-use/9847/2 "2015-04-07T18:55:22Z")

</div>

What exactly do you want to do with that function?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [April 7, 2015, 7:29pm UTC](https://forum.inductiveautomation.com/t/system-tag-browsehistoricaltags-example-of-use/9847/3 "2015-04-07T19:29:00Z")

</div>

There is no documentation or examples in the User Manual. So far, all efforts have only returned enabled historical providers.

What does this function do? How is it useful? How is it used?

---

<div class="post-metadata">

**Author:** ![sngeru](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@sngeru](https://forum.inductiveautomation.com/u/sngeru)\
**Post date:** [April 7, 2015, 11:53pm UTC](https://forum.inductiveautomation.com/t/system-tag-browsehistoricaltags-example-of-use/9847/4 "2015-04-07T23:53:06Z")

</div>

One of our developers has come up with this script on how the system.tag.browseHistoricalTags() function can be used:

However, the script created above is fairly complex. If your goal is to retrieve the historical tag paths I would suggest using a database query that would be equivalent to something like this:

“select tagpath from sqlth\_te where retired is null”

where “sqlth\_te” is the table where all historical tags are located and “retired” being null filters for only the tags that are actively being used by the Historian.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 8, 2015, 6:36pm UTC](https://forum.inductiveautomation.com/t/system-tag-browsehistoricaltags-example-of-use/9847/5 "2015-04-08T18:36:00Z")

</div>

Thanks for the example.  
My aim was tu use this fonction to list historical tags and compare sqlt\_te table to check if all is well sync between realtime bd and histoty db after lots of tags manipulation (tag delete, create, recreate witb same tag path, history db not alwals enable, …)  
I will use system.tag.browse
