Update shared groups REST API to include all the supported params
Problem
Follow-up from !155251 (merged) and #424959 (closed).
- We want to add more params support.
- Refactor notes !155251 (comment 1967928431)
Context: !155251 (comment 1942541777)
Proposal
Make the following additional attributes available for https://docs.gitlab.com/ee/api/groups.html#list-a-groups-shared-groups:
Attribute | Type | Required | Description |
---|---|---|---|
skip_groups | array of integers | no | Skip the group IDs passed |
all_available | boolean | no | Show all the groups you have access to (defaults to false for authenticated users, true for administrators); Attributes owned and min_access_level have precedence |
statistics | boolean | no | Include group statistics (administrators only). Note: The REST API response does not provide the full RootStorageStatistics data that is shown in the UI. To match the data in the UI, use GraphQL instead of REST. For more information, see the Group GraphQL API resources. |
owned | boolean | no | Limit to groups explicitly owned by the current user |
min_access_level | integer | no | Limit to groups where current user has at least this role (access_level) |
top_level_only | boolean | no | Limit to top level groups, excluding all subgroups |
repository_storage | string | no | Filter by repository storage used by the group (administrators only). Introduced in GitLab 16.3. Premium and Ultimate only. |
marked_for_deletion_on | date | no | Filter by date when group was marked for deletion. Introduced in GitLab 17.1. Premium and Ultimate only. |
Implementation plan
All these params might be present in GroupsFinder or another similar finder. We can move the comment methods to a module/concern and reuse it.
Edited by Abdul Wadood