Extend Direct Transfer API endpoints to allow for broader queries based on group and/or project IDs
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Currently the various Direct Transfer API endpoints appear to operate solely from inheriting context based on the user tied to the request. This restricts usage of these API endpoints in the sense that when you wish to gather details for a specific group or project, the request has to come from an API token tied to a user related to those items. This request is to extend the API to allow for queries against specific projects and groups. For example, this would allow for users with appropriate permissions (such as an Admin) to perform queries against specific projects and groups so that they can use these API endpoints with their own API access.
What is the current behavior?
- A user has performed a Direct Transfer of a group and it's projects. For sake of example, let's say the destination group they transferred items into is under
/test-group
. - The transfer appears to have run into some problems, and the user can see this based on the output of the Get list of failed import records for group or project migration entity API request. To do this, they're specifying a
bulk_import
ID and anentity
ID that they initially gathered from the List all group or project migrations’ entities API request. - The user reaches out to a technical contact within their organization for assistance on how to move forward based on the problems they're seeing.
- The technical contact is an Admin user on the GitLab environment, however they do not have access to any of the direct logging on the GitLab instance, and they wish to see the same API output that the user saw.
- When the technical contact starts their investigation from scratch and tries to use the Direct Transfer API endpoints to see the same details that the user saw, it's not actually possible to get the required details as their own user. Specifically, they cannot gather the relevant
bulk_import
orentity
IDs from the context of their user account. Likewise, they cannot gather the same details from the UI pages at/import/history
+/import/bulk_imports/history
unless they impersonate as the user that performed the Direct Transfer.
What is the desired behavior?
The desired behavior would be if a project ID or Group ID (depending on the transfer type) could be specified when using these API endpoints. In this case, when the technical contact in this example decides to investigate by using a similar API flow that the user performed, in their initial steps they can specify which specific group or project they wish to query, to then get any relevant bulk_import
and entity
IDs.