Contacts many_to_many relationship with Users - how to use?

If you navigate to Admin -> Studio -> Contacts -> Relationships, you will see that Contacts has a many-to-many relationship with Users. 

I cannot access a contact's users via the API. I've tried `Contacts/:id/link/users`, `Contacts/:id/collection/users`, `Contacts/:id/link/contacts_users`, and `Contacts/:id/link/contacts_users`. How exactly can we access this relationship via the API?

Context: we are using SugarCRM as an API for a custom frontend, and we would like to leverage the many-to-many relationship between contacts and users to set up restricted visibility for assigned users. I'm aware that SugarCRM has a default assigned_user field, but we need to assign more than one user to contacts. 

Parents Reply
  • Last question here:  if I am an admin-level user with API access, I can still access resources even if I'm not on an assigned team. For example, if there's a Note and the only associated team is Team Claus, I still see that note when I GET /Notes.

    Is there an easy way for me to make an API request that only fetches resources to which I have access (i.e. Global, or any team which is also associated with that resource) other than using filter params? I haven't found anything yet so I thought I'd ask here, plus filter params would not provide the security we would like (I would have to add logic hooks to make sure we don't return resources to which a given user does not have access).

Children