Hi, Using remote api (SOAP or REST), I want to get all mail forwards, or mail users, or anything related to a given client. Problem: I know only the client_id, and I need the sys_userid to select the mail_forwarding item. There is a call (client_get_id) that returns the client_id knowing the sys_userid, but I didn't find how to do the reverse, did I miss something obvious?
You need the sys_groupid, not the sys_userid. The group defines the onwer of a record while the userid is the creator of it, that can be the same but it don't has to be the same, e.g. when an admin creates a mail domain for a client, then the creator is the admin but the owner (group) is the client. You can get the groupid for a give client_id with this remote api function: client_get_groupid($session_id, $client_id)