Retool Postgres Schema

I am trying to query the retool database to find the users who have access to an app. I have created a group with permissions to the app and added myself. I have Admin permissions and our Retool is on-prem.

I can see the users in the users table, but can't see an apps table, so I assume that apps are in the pages table. I cannot see how users are connected to pages.

I have tried joining against groups and user_groups, but this returns no results.

I also assume that filtering needs to be done to the correct space, however I cannot see where that is stored.

Does anyone have a diagramme (e.g. UML) on how the tables are linked?

It looks like the organizations table contains the spaces

Hi,
There is a provided resource that can retrieve the apps and folders for the current user - would that be sufficient or are you looking to do this more from a reporting/governance perspective?

That worked well, thanks