# Replacing Query Tags with REST API

**URL:** <https://forum.inductiveautomation.com/t/replacing-query-tags-with-rest-api/113591>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 28, 2026, 10:24am UTC](https://forum.inductiveautomation.com/t/replacing-query-tags-with-rest-api/113591 "2026-01-28T10:24:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [January 28, 2026, 10:24am UTC](https://forum.inductiveautomation.com/t/replacing-query-tags-with-rest-api/113591/1 "2026-01-28T10:24:19Z")

</div>

In my project, I have about 300 UDTs that contain query tags.

The table they currently reference will be removed soon and replaced by an API.

Since I have only used REST calls for single, standalone tasks and never on this scale, I was wondering what the best approach would be to populate this data using REST calls.

Thanks.

---

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [January 28, 2026, 10:44am UTC](https://forum.inductiveautomation.com/t/replacing-query-tags-with-rest-api/113591/2 "2026-01-28T10:44:37Z")

</div>

Do you still have access to some type of database for making tables?

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [January 28, 2026, 10:57am UTC](https://forum.inductiveautomation.com/t/replacing-query-tags-with-rest-api/113591/3 "2026-01-28T10:57:11Z")

</div>

Yes, I have a MSSQL DB for my tables that I can manage.

---

<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:** [January 28, 2026, 12:14pm UTC](https://forum.inductiveautomation.com/t/replacing-query-tags-with-rest-api/113591/4 "2026-01-28T12:14:14Z")

</div>

Consider using `runScript()` expressions instead of query bindings, and have your script cache all of the results in a top-level dictionary. Only call out to the API for missing values.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [January 28, 2026, 7:16pm UTC](https://forum.inductiveautomation.com/t/replacing-query-tags-with-rest-api/113591/5 "2026-01-28T19:16:45Z")

</div>

The current query binding is similar to this code:

> SELECT \* FROM MyTable
> 
> WHERE ProductionOrder = 'actualOrder'

where actualOrder is a UDT tag. The result is usually a dataset with about 80 columns and 150 rows.

The current advantage is that the query is executed only when the ProductionOrder value changes.

@pturmel I don’t understand what you mean with “_cache all of the results in a top-level dictionary_”

Thank you for the help.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [January 28, 2026, 8:41pm UTC](https://forum.inductiveautomation.com/t/replacing-query-tags-with-rest-api/113591/6 "2026-01-28T20:41:52Z")

</div>

> [@Aiasa21](#):
>
> I don’t understand what you mean with “_cache all of the results in a top-level dictionary_”

search the forum for this terminology to see discussions on it, but basically you have a global variable in a project script that caches your api results. You only need to use the API if it doesn't already exist in the dictionary.  
examples:  
[Global Scripting Variables (Library Script Top-Level Vars) - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/global-scripting-variables-library-script-top-level-vars/60516)  
[Imperial/Metric conversion: Where do you put your single source of truth? - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/imperial-metric-conversion-where-do-you-put-your-single-source-of-truth/113313/21)

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [January 29, 2026, 10:29am UTC](https://forum.inductiveautomation.com/t/replacing-query-tags-with-rest-api/113591/7 "2026-01-29T10:29:06Z")

</div>

Thanks for the links, I didn’t know about this. 👍
