system.tag.browseHistoricalTags example of use?

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 ???

What exactly do you want to do with that function?

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?

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.

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