TransferRepository
Transfers a code repository to a specified code group. Both groupId and repositoryId support full paths.
Try it now
Test
RAM authorization
Request syntax
POST /api/v4/projects/repository/transfer HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| organizationId |
string |
Yes |
The enterprise identifier, also known as the enterprise ID. It is a string that you can obtain from the Yunxiao URL, such as https://devops.aliyun.com/organization/[OrganizationId]. |
5ebbc0228123212b59xxxxx |
| accessToken |
string |
No |
The personal access token. This parameter is not required if you use an Alibaba Cloud AccessKey pair or Security Token Service (STS) for temporary authorization. |
f0b1e61db5961df5975a93f9129d2513 |
| repositoryId |
string |
Yes |
The ID or full path of the code repository. |
2080972 or orgId/test-group-1/test-repo |
| groupId |
string |
Yes |
The ID or full path of the code group. |
34839 or orgId/transfer-group |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
The request ID. |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
| errorCode |
string |
The error code. |
Openapi.RequestError |
| errorMessage |
string |
The error message. |
”“ |
| success |
boolean |
Indicates whether the request is successful. |
true |
| result |
object |
The returned result. |
|
| id |
integer |
The ID of the code repository. |
19285 |
| path |
string |
The path of the code repository. |
test-repo |
| name |
string |
The name of the code repository. |
test-repo |
| description |
string |
The description of the code repository. |
Specific description content |
| pathWithNamespace |
string |
The full path of the code repository, including the full group path. |
codeup-test-org/test-create-codeup |
| nameWithNamespace |
string |
The full name of the code repository, including the full group name. |
codeup-test-org / test-create-group (with spaces on both sides of the slash) |
| visibilityLevel |
integer |
The visibility level. Valid values:
|
0 |
| lastActivityAt |
string |
The last activity time. |
2022-01-14T21:08:26+08:00 |
| starCount |
integer |
The number of stars. |
0 |
| webUrl |
string |
The URL used to access the web page. |
"" |
| starred |
boolean |
Indicates whether the repository is starred by the current user. |
true |
| namespaceId |
integer |
The ID of the parent path. |
100003 |
| accessLevel |
integer |
The permission type. Valid values:
|
30 |
| demoProject |
boolean |
The demo repository identifier. |
false |
| createdAt |
string |
The creation time in ISO 8601 format, including the time zone offset. |
2022-01-14T21:08:26+08:00 |
| updatedAt |
string |
The update time in ISO 8601 format, including the time zone offset. |
2022-01-14T21:08:26+08:00 |
| archived |
boolean |
The archive identifier. |
false |
| creatorId |
integer |
The ID of the creator. |
19238 |
| encrypted |
boolean |
The encryption identifier. |
false |
Examples
Success response
JSON format
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
"errorCode": "Openapi.RequestError",
"errorMessage": "”“",
"success": true,
"result": {
"id": 19285,
"path": "test-repo",
"name": "test-repo",
"description": "描述信息的具体内容\n",
"pathWithNamespace": "codeup-test-org/test-create-codeup",
"nameWithNamespace": "codeup-test-org / test-create-group (斜杠两侧有空格)",
"visibilityLevel": 0,
"lastActivityAt": "2022-01-14T21:08:26+08:00",
"starCount": 0,
"webUrl": "\"\"",
"starred": true,
"namespaceId": 100003,
"accessLevel": 30,
"demoProject": false,
"createdAt": "2022-01-14T21:08:26+08:00",
"updatedAt": "2022-01-14T21:08:26+08:00",
"archived": false,
"creatorId": 19238,
"encrypted": false
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.