zendesk_api_client_rb
zendesk_api_client_rb copied to clipboard
Add feature for additional API requests
Feature Request Summary: When making a call to listing users, add the ability to side-load to an ("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: Add feature that permits users to be members of multiple organizations given permissions for Membership Organization via the Zendesk API, which instead are using organization membership endpoints (over the user "organization_id") While you can side-load users "organizations", this only returns basic organization info, it's doesn't return any specified member information. In this use case, org memberships are needed when syncing users from a source system into Zendesk so that known memberships would be able to be tagged as correctly identified.
Feature Request limitation or missing feature: The missing option for side-loading organization memberships results in additional API requests being unnecessarily made 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, there isn't a clearly defined method to list users by "organization_id" but doing the same for organization memberships only returns memberships for that organization. Example:
GET /api/v2/organizations/{organization_id}/users.json
GET /api/v2/organizations/{organization_id}/organization_memberships.json
Instead, it's required to list the organization users and then individually retrieve their organization memberships. This would cause an added API call for every organization member. Example:
GET /api/v2/organizations/{organization_id}/users.json
GET /api/v2/users/{user_id}/organization_memberships.json