# Query Tag History data from external system

**URL:** <https://forum.inductiveautomation.com/t/query-tag-history-data-from-external-system/67163>\
**Category:** Ignition\
**Created:** [December 1, 2022, 7:17pm UTC](https://forum.inductiveautomation.com/t/query-tag-history-data-from-external-system/67163 "2022-12-01T19:17:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![smiano](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@smiano](https://forum.inductiveautomation.com/u/smiano)\
**Post date:** [December 1, 2022, 7:17pm UTC](https://forum.inductiveautomation.com/t/query-tag-history-data-from-external-system/67163/1 "2022-12-01T19:17:22Z")

</div>

I am wondering what is the best/most efficient way to query for tag history data from an external system.  
I have determined that the underlying SQL data tables are tricky because they segment Monthly or based on whatever policy you set. Its also not straightforward how the TagIDs join to the tag names, with some nulls values, so its not immediately obvious that building your own SQL select statement on the underlying sql tables is optimal.  
Is there a web-services API for querying tag history?

---

<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:** [December 1, 2022, 7:35pm UTC](https://forum.inductiveautomation.com/t/query-tag-history-data-from-external-system/67163/2 "2022-12-01T19:35:58Z")

</div>

> [@smiano](#):
>
> Is there a web-services API for querying tag history?

No, but rolling your own with the WebDev module shouldn't be too difficult.

---

<div class="post-metadata">

**Author:** ![smiano](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@smiano](https://forum.inductiveautomation.com/u/smiano)\
**Post date:** [December 6, 2022, 8:05pm UTC](https://forum.inductiveautomation.com/t/query-tag-history-data-from-external-system/67163/3 "2022-12-06T20:05:58Z")

</div>

True, unfortunately that comes with a license cost. IA should consider removing license cost from WebDev

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [December 6, 2022, 8:09pm UTC](https://forum.inductiveautomation.com/t/query-tag-history-data-from-external-system/67163/4 "2022-12-06T20:09:32Z")

</div>

Don't hold your breath.

Nothing keeping from writing your own module, if you don't want to pay the cost of the License. Or writing the queries required to span partitions. Both of those options are free (from the perspective of IA).
