Recent searches
No recent searches
API: Side-load User Organization Memberhips
Posted Nov 19, 2021
Feature Request Summary:
When listing users, add the ability to side-load ("include") organization memberships. Example:
GET /api/v2/users.json?include=organization_memberships
GET /api/v2/groups/{group_id}/users.json?include=organization_memberships
GET /api/v2/organizations/{organization_id}/users.json?include=organization_memberships
Description/Use Cases:
We utilize the ability for users to be a member of multiple organizations, so to support this via API is to use the organization membership endpoints (over the user "organization_id"). While you can side-load users "organizations", this only returns basic organization info, not membership details. In our case, org memberships are needed when syncing users from our source systems into Zendesk (to know if memberships are correct).
Business impact of limitation or missing feature:
The lack of side-loading organization memberships results in additional API requests being necessary to retrieve the information (deducting from usage limit counts). And each additional request takes time to complete, increasing the total time to retrieve all information.
Other necessary information or resources:
Additionally, we list users by "organization_id" but doing the same for organization memberships only returns memberships for that organization (we need memberships across organizations). Example:
GET /api/v2/organizations/{organization_id}/users.json
GET /api/v2/organizations/{organization_id}/organization_memberships.json
Instead, we have to list the organization users and then individually retrieve their organization memberships. This results in an extra API call for each organization member. Example:
GET /api/v2/organizations/{organization_id}/users.json
GET /api/v2/users/{user_id}/organization_memberships.json
2
1 comment
Ryan P.
FWIW, this is our biggest API need. We have 100,000 users that we sync, so needing to retrieve organization memberships for all users will take a long time. We will have a system in place to only process changed user accounts, but if we ever need to do a "full run" it will take a long time.
0