# \[feature-9544\]Query a list of tag providers in a gateway?

**URL:** <https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719>\
**Category:** General Discussion\
**Created:** [May 25, 2016, 5:30pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719 "2016-05-25T17:30:51Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![bokechal](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bokechal](https://forum.inductiveautomation.com/u/bokechal)\
**Post date:** [May 25, 2016, 5:30pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/1 "2016-05-25T17:30:51Z")

</div>

Hi,  
I’d like to get a list of tag providers in a gateway.  
I use system.tag.browseTags to [System]Gateway/Tags  
However, there’s not all tag providers in there.  
Is there any other way to do to achieve that?

Thanks

---

<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:** [May 25, 2016, 5:57pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/2 "2016-05-25T17:57:11Z")

</div>

The [System]Gateway/Tags/ folder has entries for each general tag provider. You might find the attached shared script module helpful. First [published last year](https://inductiveautomation.com/forum/viewtopic.php?f=70&t=14708).

---

<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:** [May 25, 2016, 5:59pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/3 "2016-05-25T17:59:33Z")

</div>

I’m curious which providers are missing?

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [October 12, 2017, 3:19pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/4 "2017-10-12T15:19:41Z")

</div>

Remote tag providers do not get listed here…

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 12, 2017, 3:54pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/5 "2017-10-12T15:54:36Z")

</div>

There’s a feature request pending for this - but you can use a message handler to ask the gateway for this information:

```auto
	from com.inductiveautomation.ignition.gateway import SRContext
	context = SRContext.get()
	output = []
	for provider in context.getTagManager().getTagProviders():
		output.append(provider.getInformation().getName())
	return output

```

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [October 12, 2017, 3:59pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/6 "2017-10-12T15:59:14Z")

</div>

Awesome! Thanks, that was easy

---

<div class="post-metadata">

**Author:** ![paul.bouillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.bouillon/32/7980_2.png) [@paul.bouillon](https://forum.inductiveautomation.com/u/paul.bouillon)\
**Post date:** [May 1, 2019, 4:44pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/7 "2019-05-01T16:44:34Z")

</div>

Hey – just wondering if there is a way to do this in version 8? Doesn’t look like SRContext is in com.inductiveautomation.ignition.gateway anymore:  
[com.inductiveautomation.ignition.gateway](http://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.0-beta/com/inductiveautomation/ignition/gateway/package-summary.html)

---

<div class="post-metadata">

**Author:** ![paul.bouillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.bouillon/32/7980_2.png) [@paul.bouillon](https://forum.inductiveautomation.com/u/paul.bouillon)\
**Post date:** [May 2, 2019, 6:14pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/8 "2019-05-02T18:14:45Z")

</div>

think i have it sorted out now – took a while to get my head wrapped around the various “contexts” and discover which packages/modules are available from the various contexts…

I was trying to populate a provider list in the designer/client – seems like I just need to access the “context” of the object running the script – e.g.:

```auto
context = event.source.getAppContext()
# context = event.source.getAccessibleContext()

```

or

```auto
context = self.getAppContext()
# context = self.getAccessibleContext()

```

from there – all of what is mentioned above applies (e.g. getting the tag manager, getting the provider props):

```auto
provs = []
tm = context.getTagManager()
provprops = tm.getProviderProperties()
for p in provprops:
        provs.append(p.getName())

```

---

<div class="post-metadata">

**Author:** ![brian.ankeny](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@brian.ankeny](https://forum.inductiveautomation.com/u/brian.ankeny)\
**Post date:** [July 14, 2020, 3:31pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/9 "2020-07-14T15:31:54Z")

</div>

Hi PGriffith …Was the feature request you mentioned ever implemented?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 14, 2020, 4:25pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/10 "2020-07-14T16:25:25Z")

</div>

Not yet. Our low priority feature backlog is pretty long. There might be another way to back into the same information in 8.0 via system.tag.browse; I’m not sure.

---

<div class="post-metadata">

**Author:** ![brian.ankeny](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@brian.ankeny](https://forum.inductiveautomation.com/u/brian.ankeny)\
**Post date:** [July 15, 2020, 5:24pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/11 "2020-07-15T17:24:38Z")

</div>

Thanks for the quick reply!

---

<div class="post-metadata">

**Author:** ![alex.narvais](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@alex.narvais](https://forum.inductiveautomation.com/u/alex.narvais)\
**Post date:** [September 29, 2020, 11:01pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/12 "2020-09-29T23:01:05Z")

</div>

PGriffen, this doesn’t seem to be working for me I have configured a gateway message handler with the following code:

```auto
from com.inductiveautomation.ignition.gateway.tags.model import GatewayTagManager as tm
provider = tm.getTagProviderNames()
payload = {'key':provider}

```

I then use a button to request the message handler to run script and give me this messages so i can display it to a label. When checking gateway script status for the handler it doesn’t seem to work or want to run?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 29, 2020, 11:13pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/13 "2020-09-29T23:13:02Z")

</div>

`GatewayTagManager` doesn’t have a static method `getTagProviderNames()`, it has an _instance_ method `getTagProviderNames` - you need to obtain an _instance_ of `GatewayTagManager` before you can call the method; that’s what the `SRContext` import in the snippet I posted is for. `SRContext` was renamed `IgnitionGateway` in 8.0 and up.

---

<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:** [September 29, 2020, 11:14pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/14 "2020-09-29T23:14:36Z")

</div>

You’ve imported the gateway tag manager **class** , not an instance. You’re probably going to have to import `IgnitionGateway` and use its static method to get its singleton, and then get its tag manager instance.

---

<div class="post-metadata">

**Author:** ![alex.narvais](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@alex.narvais](https://forum.inductiveautomation.com/u/alex.narvais)\
**Post date:** [September 30, 2020, 12:35am UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/15 "2020-09-30T00:35:05Z")

</div>

Where in the JavaDoc are you pulling that ? I’m confused where the package is ?

---

<div class="post-metadata">

**Author:** ![hayden](https://avatars.discourse-cdn.com/v4/letter/h/91b2a8/32.png) [@hayden](https://forum.inductiveautomation.com/u/hayden)\
**Post date:** [July 29, 2022, 6:08am UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/16 "2022-07-29T06:08:52Z")

</div>

Thought I’d add for completeness as I was googling this question. Maybe someone can use it.

A script to list all tag providers can be simply done with system.tag.browse as below.

```auto
def tagProviders():
	tags=system.tag.browse(filter={"tagType":"Provider"}).results
	a=[]
	for result in tags:
		providers=str(result['fullPath'])
		a.append(providers)
	return a	

```

---

<div class="post-metadata">

**Author:** ![Lynn\_Martineau](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@Lynn\_Martineau](https://forum.inductiveautomation.com/u/Lynn_Martineau)\
**Post date:** [December 18, 2025, 10:33pm UTC](https://forum.inductiveautomation.com/t/feature-9544-query-a-list-of-tag-providers-in-a-gateway/11719/17 "2025-12-18T22:33:57Z")

</div>

> [@List Tag Providers](https://forum.inductiveautomation.com/t/list-tag-providers/27722/6):
>
> If anyone is still looking for this it’s easy with system.tag.browse. allProviders = system.tag.browse('') for provider in allProviders: print provider
