Description: If not assigned, assigns a repository to a project. If already assigned, moves the project repository to the specified location, and unassigns the repository from the previous project.
Note
When you assign a resource to a project, the project owns and manages the resource. When you share a resource with a project, the project does not own the resource.
Since: 7.17.4
Security: Requires a user assigned with the 'Administer the Platform' role.
Usage: PUT ${baseUrl}/access/api/v1/projects/_/attach/repositories/{repo_name}/{target_project_key}?force=true/false
Produces: application/json
Parameters :
Name | Description |
---|---|
(path) | The project key |
(path) | The repository name |
(query) | Indicates a force move if the repo_name is already assigned to an actual project |
Header parameter: Authorization: Bearer
Sample Request
curl --location --request PUT '${baseUrl}/access/api/v1/projects/_/attach/repositories/{repo_name}/{target_project_key}?force=true/false' \ --header 'Authorization: Bearer <a valid access-token>'
Sample Response
Moved