See this post:
I would like to be able to pass in the name of a project from a gateway script or webdev endpoint to be able to build an array of objects to return to caller for project details on host gateway. I imagine this would be similar to
system.perspective.getSessionInfo(projectFilter="myProject")