Inverted relation retrieval yields no results

I am trying to get all the Users that belong to a specific Organisation. As you can see in the image below. Users have a 1 on 1 relation to an organisation. From what I could find, Inverted Relation Retrieval would be the way to achieve this.

My endpoint looks like this: (when sent, it is properly URL encoded)

data/Organisations?where=Users[organisation].objectId = '3166A09C-5FF6-47E8-A256-8ED4EC846C22'

However, it seems the result is always empty. The objectId is the correct one and has 27 users linked to it. So I am not sure what I am doing wrong, or if I am misunderstanding the inverted relation retrieval.

Any help would be appreciated.

Hello @Joey_Fladderak,

I am trying to get all the Users that belong to a specific Organisation.

If you want to retrieve users, you should query the Users table, not the Organisation table. Your query should look like the following:

data/Users?where=organisation.objectId = '<organisation-id>'

Hi @sergey.kuk,

Yes, it seems I am just making it harder on myself than it actually is. :slight_smile:

1 Like