How to relate Party to User using REST?

Discussions

Ask a Question
Back to All

How to relate Party to User using REST?

There doesn't seem to be a good, natural way to get from a Party to a User.

If I know the login (such as if they logged to my application/web service), I can retrieve /api/user?Username=Equal:{username} to discover their ID and then retrieve the Party. If it's for a single user, not a big deal. If I need something from Party in order to display information about a list of users, that looks like a lot of individual calls to /api/party/{id}.

If I'm starting from a party (or a list of parties), I don't see a good way to discover which ones have a user, other than asking over and over again for users with the ID I'm interested in, and then recognizing the 404 as parties with no user. Again, lots of extra requests if I'm displaying a list. Heaven forbid I should be looking specifically for parties without a login.

Would I be better off creating an IQA query and retrieving that?

What about if the client app is logging into REST as the user? Is there a good way to retrieve the party object (or even the user object) for the logged in user?