Gets the details of a specified code source configuration.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paicodesource:GetCodeSource |
get |
*All Resource
|
None | None |
Request syntax
GET /api/v1/codesources/{CodeSourceId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CodeSourceId |
string |
Yes |
The ID of the code source configuration. To obtain the ID, see ListCodeSources. |
code-202********** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response structure. |
||
| CodeSourceId |
string |
The ID of the code source configuration. |
code-202********** |
| DisplayName |
string |
The name of the code source configuration. |
MyCodeSource1 |
| Description |
string |
The detailed description of the code configuration. |
This is my data source 1. |
| CodeRepo |
string |
The URL of the code repository. |
https://code.aliyun.com/pai-dlc/examples.git |
| CodeBranch |
string |
The branch of the code repository. |
master |
| CodeCommit |
string |
The commit ID of the code. |
44da10*********** |
| CodeRepoUserName |
string |
The username for the code repository. |
user1 |
| CodeRepoAccessToken |
string |
The token used to access the code repository. |
xxxx |
| MountPath |
string |
The local mount path for the code. |
/root/code |
| Accessibility |
string |
The visibility of the code configuration. Valid values:
Valid values:
|
PRIVATE |
| UserId |
string |
The ID of the user who created the code source configuration. |
1722******** |
| WorkspaceId |
string |
The ID of the workspace. |
1234 |
| GmtCreateTime |
string |
The time when the code configuration was created. The time is in the ISO 8601 format. |
2021-01-12T23:36:01.123Z |
| GmtModifyTime |
string |
The time when the code configuration was last modified. The time is in the ISO 8601 format. |
2021-01-12T23:36:01.123Z |
| RequestId |
string |
The request ID. |
5A14FA81-DD4E-******-6343FE44B941 |
| CloneType |
integer |
Examples
Success response
JSON format
{
"CodeSourceId": "code-202**********",
"DisplayName": "MyCodeSource1",
"Description": "This is my data source 1.",
"CodeRepo": "https://code.aliyun.com/pai-dlc/examples.git",
"CodeBranch": "master",
"CodeCommit": "44da10***********",
"CodeRepoUserName": "user1",
"CodeRepoAccessToken": "xxxx",
"MountPath": "/root/code",
"Accessibility": "PRIVATE",
"UserId": "1722********",
"WorkspaceId": "1234",
"GmtCreateTime": "2021-01-12T23:36:01.123Z",
"GmtModifyTime": "2021-01-12T23:36:01.123Z",
"RequestId": "5A14FA81-DD4E-******-6343FE44B941",
"CloneType": 0
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.