# How do I get a list of the projects on a gateway?

**URL:** <https://forum.inductiveautomation.com/t/how-do-i-get-a-list-of-the-projects-on-a-gateway/11988>\
**Category:** Ignition\
**Created:** [July 28, 2016, 6:53pm UTC](https://forum.inductiveautomation.com/t/how-do-i-get-a-list-of-the-projects-on-a-gateway/11988 "2016-07-28T18:53:10Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![anthony\_ho](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@anthony\_ho](https://forum.inductiveautomation.com/u/anthony_ho)\
**Post date:** [August 10, 2023, 9:52pm UTC](https://forum.inductiveautomation.com/t/how-do-i-get-a-list-of-the-projects-on-a-gateway/11988/21 "2023-08-10T21:52:21Z")

</div>

```auto
def doGet(request, session):
	import operator
	from com.inductiveautomation.ignition.gateway import IgnitionGateway
	 
	results = []
	context = IgnitionGateway.get()
	
	for project in context.getProjectManager().projectNames:
		
		results.append({
			'name': project
		})
		
	results = sorted(results, key=operator.itemgetter('name'))
			
	return {
		'json': {
			'parameters': {}, 
			'totalResults': len(results), 
			'projects': results
		}
	}

```

---

<div class="post-metadata">

**Author:** ![James.Sletten](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@James.Sletten](https://forum.inductiveautomation.com/u/James.Sletten)\
**Post date:** [January 19, 2024, 2:02pm UTC](https://forum.inductiveautomation.com/t/how-do-i-get-a-list-of-the-projects-on-a-gateway/11988/22 "2024-01-19T14:02:42Z")

</div>

I know this is an old thread but posing because I had the same question and was struggling with some of the other solutions.

There is a system function that will return a list of project on a gateway.  
[https://docs.inductiveautomation.com/display/DOC81/system.project.getProjectNames](https://docs.inductiveautomation.com/display/DOC81/system.project.getProjectNames)

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [January 20, 2024, 1:32am UTC](https://forum.inductiveautomation.com/t/how-do-i-get-a-list-of-the-projects-on-a-gateway/11988/23 "2024-01-20T01:32:56Z")

</div>

> [@James.Sletten](#):
>
> There is a system function

I was curious, so I did a quick search and found this:

> [@Nightly 8.0 Changelogs - 2020](https://forum.inductiveautomation.com/t/nightly-8-0-changelogs-2020/31153/32):
>
> Nightly Changelog: 8.0.11-b20200304 Ignition Platform 14460: Designer Login - Layout Redesign 12077: add system.project scripting space Add system.project.getProjectNames() and duplicate system.util.getProjectName() into system.project.getProjectName() 15868: Accept table cell edit in dataset tag editor on value commit Vision 9527: Add “scripting” to template node popup in project browser

It looks like this was added in 2020, but looking at the posts on this thread between 2020 and now; most of them have strayed a bit from the original topic, so I guess it makes sense that they don't mention this.

---

<div class="post-metadata">

**Author:** ![indenkleefj](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/indenkleefj/32/10961_2.png) [@indenkleefj](https://forum.inductiveautomation.com/u/indenkleefj)\
**Post date:** [March 22, 2024, 11:22am UTC](https://forum.inductiveautomation.com/t/how-do-i-get-a-list-of-the-projects-on-a-gateway/11988/24 "2024-03-22T11:22:58Z")

</div>

Hi John,

Did you find an answer to this question?  
I'm looking for the same information and was surprised that the info is not included in the getProjectInfo() function.

---

<div class="post-metadata">

**Author:** ![jasoncoope](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jasoncoope/32/18674_2.png) [@jasoncoope](https://forum.inductiveautomation.com/u/jasoncoope)\
**Post date:** [August 10, 2024, 8:15pm UTC](https://forum.inductiveautomation.com/t/how-do-i-get-a-list-of-the-projects-on-a-gateway/11988/25 "2024-08-10T20:15:17Z")

</div>

I'm using the IgnitionGateway context to return a list of projects as suggested above.

How can I filter to only return runnable projects? Thought there might be a flag or something indicting if it is inheritable or not stashed in the .getProjectProps() function, but I can't decipher which of the many objects returned it might be held in.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 10, 2024, 9:22pm UTC](https://forum.inductiveautomation.com/t/how-do-i-get-a-list-of-the-projects-on-a-gateway/11988/26 "2024-08-10T21:22:24Z")

</div>

Call [`ProjectManagerBase::getProject`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.42/com/inductiveautomation/ignition/gateway/project/ProjectManagerBase.html#getProject(java.lang.String)) and then [`Project::isRunnable`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.42/com/inductiveautomation/ignition/common/project/Project.html#isRunnable()).

---

<div class="post-metadata">

**Author:** ![jasoncoope](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jasoncoope/32/18674_2.png) [@jasoncoope](https://forum.inductiveautomation.com/u/jasoncoope)\
**Post date:** [August 11, 2024, 12:58am UTC](https://forum.inductiveautomation.com/t/how-do-i-get-a-list-of-the-projects-on-a-gateway/11988/27 "2024-08-11T00:58:25Z")

</div>

Thanks Kevin. Appreciate you working on a Saturday too!  
Got this working with...

```python
	from com.inductiveautomation.ignition.gateway import IgnitionGateway
	ign = IgnitionGateway.get().getProjectManager()

	options = []
	for project in list(ign.projectNames):
		obj = ign.getProject(project).get()
		system.perspective.print('%s %s %s'%(project, obj.isRunnable(), obj.getDescription()))
		if obj.isRunnable(): options.append({'label': project, 'value': project})

	return options

```

[Previous page](https://forum.inductiveautomation.com/t/how-do-i-get-a-list-of-the-projects-on-a-gateway/11988.md?page=1)
