Transferring a Repository Group
Function
This API is used to transfer a repository group.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
PUT https://{hostURL}/v4/groups/{group_id}/transfer
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| group_id | Yes | Integer | Definition Repository group ID, which is the numeric ID next to Group ID on the repository group homepage. Value range: 1~2147483647 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. Obtain a token by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Constraints Mandatory. Range 1–100,000 characters. Default Value N/A. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| owner_id | No | Integer | ID of the target transfer user Value range: 1~2147483647 |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| id | Integer | Repository group ID |
| full_name | String | Full name of the repository group |
| full_path | String | Full path of the repository group |
| my_role | GroupMyRoleDto object | Member role information |
| name | String | Repository group name |
| parent_id | Integer | Parent ID of the repository group |
| creator_id | Integer | Repository group owner ID |
| Parameter | Type | Description |
|---|---|---|
| id | Integer | Member ID |
| access_level | Integer | Member role value |
| role_namecn | String | Role name (CN) |
| role_namen | String | Role name |
| source_id | Integer | Source repository group ID |
| source_type | String | Source type |
| user_id | Integer | User ID |
| notification_level | Integer | Suggestion level |
| created_at | String | Creation time |
| updated_at | String | Update time. |
| created_by_id | Integer | Creator ID |
| invite_email | String | Invitation email |
| invite_token | String | Invitation token |
| invite_accepted_at | String | Invitation acceptance time |
| requested_at | String | Request time |
| expires_at | String | Expiration time |
| limited | Boolean | Limit |
| isProjectAdmin | Integer | Project administrator or not |
| isGroupCreator | Integer | Organization creator or not |
| isRepoCreator | Integer | Repository creator or not |
| roleShowFlag | Integer | Display flag |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code. |
| error_msg | String | Definition Error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code. |
| error_msg | String | Definition Error message. |
Example Requests
/v4/groups/{group_id}/transfer
{
"owner_id" : 111
} Example Responses
Status code: 200
OK
{
"id" : 2111892588,
"full_name" : "2b4a0a1743fe45d4869aff725b8c8293 / group2 / group2.1",
"full_path" : "2b4a0a1743fe45d4869aff725b8c8293/group2/group2.1",
"my_role" : {
"id" : 714996,
"access_level" : "50",
"role_namecn" : null,
"role_namen" : null,
"source_id" : 2111890734,
"source_type" : "Namespace",
"user_id" : 7574,
"notification_level" : 3,
"created_at" : "2025-02-19T00:32:17.000+08:00",
"updated_at" : "2025-02-18T16:32:56.000+08:00",
"created_by_id" : null,
"invite_email" : null,
"invite_token" : null,
"invite_accepted_at" : null,
"requested_at" : null,
"expires_at" : null,
"limited" : false,
"isProjectAdmin" : null,
"isGroupCreator" : null,
"isRepoCreator" : null,
"roleShowFlag" : null
},
"name" : "group2.1",
"parent_id" : 2111892586,
"creator_id" : 9124
} Status code: 401
Unauthorized
{
"error_code" : "DEV.00000003",
"error_msg" : "Authentication information expired."
} Status code: 403
Bad Request
{
"error_code" : "CH.004403",
"error_msg" : "Insufficient permissions. Apply for the required permissions and try again."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 401 | Unauthorized |
| 403 | Bad Request |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.