# \[IGN-18211\]system.config.getResources and collectionName=local

**URL:** <https://forum.inductiveautomation.com/t/ign-18211-system-config-getresources-and-collectionname-local/117389>\
**Category:** Ignition\
**Tags:** perspective, ignition83\
**Created:** [October 8, 2026, 3:05pm UTC](https://forum.inductiveautomation.com/t/ign-18211-system-config-getresources-and-collectionname-local/117389 "2026-10-08T15:05:43Z")\
**Posts on this page:** 4\
**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:** [October 8, 2026, 3:05pm UTC](https://forum.inductiveautomation.com/t/ign-18211-system-config-getresources-and-collectionname-local/117389/1 "2026-10-08T15:05:44Z")

</div>

@paul-griffith Can we read resources in a specific collection ?

Exemple for devices:

```python
moduleId="com.inductiveautomation.opcua"
typeId="device"
result = system.config.getResources(moduleId = moduleId, typeId = typeId)

for elm in result:
    system.perspective.print(elm)

```

```python
16:51:56.657 [Browser Thread: 09e0169b-e7ee-4556-bfbd-a6b3dfd9959b] INFO Perspective.Designer.Workspace -- <PyResource: ResourceId{resourcePath=com.inductiveautomation.opcua/device/AB_SIG_GRAND_HAMEAU, collectionName=local}>
16:51:56.658 [Browser Thread: 09e0169b-e7ee-4556-bfbd-a6b3dfd9959b] INFO Perspective.Designer.Workspace -- <PyResource: ResourceId{resourcePath=com.inductiveautomation.opcua/device/AB_SIG_JENNER_SUD, collectionName=local}>

```

In the result, **collectionName=local** seems to mention that the listed devices are the result of the gateway devices available according overrides and the gateway mode active.  
That's fine and it seems ok according the filesystem:

My gateway mode active is "DEV\_DB\_POSTGRES".  
mode can have 3 value:

- DEV\_DB\_POSTGRES
- DEV\_DB\_MYSQL
- DEV\_DB\_SQLSERVER

**Filesystem:**

```python
C:\Program Files\Inductive Automation\Ignition\data\config\resources\DEV_DB_POSTGRES\com.inductiveautomation.opcua\device\
AB_SIG_JENNER_SUD

```

```python
C:\Program Files\Inductive Automation\Ignition\data\config\resources\core\com.inductiveautomation.opcua\device
AB_SIG_GRAND_HAMEAU

```

```python
C:\Program Files\Inductive Automation\Ignition\data\config\resources\DEV_DB_MYSQL\com.inductiveautomation.opcua\device
AB_ES_SV1
AB_SIG_GRAND_HAMEAU
AB_SIG_LA_PLAGE

```

But how can I browse for exemple the "DEV\_DB\_MYSQL" collection (gateway mode that is inactive) without a walk of the filesystem directory ?

I would like to list for exemple all the devices of a collection and then to remove them with system.config.delete.

---

<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 8, 2026, 3:27pm UTC](https://forum.inductiveautomation.com/t/ign-18211-system-config-getresources-and-collectionname-local/117389/2 "2026-10-08T15:27:39Z")

</div>

Every `PyResource` has a `getDefiningCollection()` method as well as `getCollection()`. So you could get the "effective" list (all the devices) and then check it for ones defined specifically in the collection you're interested in.

```python
moduleId="com.inductiveautomation.opcua"
typeId="device"
result = system.config.getResources(moduleId = moduleId, typeId = typeId)
targetCollection = "DEV_DB_MYSQL"

for elm in filter(result, lambda r: r.definingCollection == targetCollection):
    system.perspective.print(elm)

```

---

<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:** [October 8, 2026, 3:38pm UTC](https://forum.inductiveautomation.com/t/ign-18211-system-config-getresources-and-collectionname-local/117389/3 "2026-10-08T15:38:33Z")

</div>

> [@paul-griffith](#):
>
> getCollection

Thanks a lot again,  
**definingCollection** is perfect to obtain the "source" collection of the resource 👍

I think getResources could be enought for my use case, because I'm mainly interested in the devices resulting from the gateway mode active collection and core collection.

But, it would be awesome if we could have a script function to obtain only the resource of a targeted collection ?  
In my example : devices of the collection "DEV\_DB\_MYSQL" that is not the gateway mode active...  
I understand it could be a corner case...

---

<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 8, 2026, 3:42pm UTC](https://forum.inductiveautomation.com/t/ign-18211-system-config-getresources-and-collectionname-local/117389/4 "2026-10-08T15:42:55Z")

</div>

No, I think it's a reasonable request, especially given all the other functions accept a collection name as an argument. I'll file a ticket.
