Queries a list of code configurations. This operation supports pagination, sorting, and conditional filtering.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paicodesource:ListCodeSources |
list |
*All Resource
|
None | None |
Request syntax
GET /api/v1/codesources HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DisplayName |
string |
No |
The display name of the code configuration. Fuzzy match is supported. |
MyDataSource |
| PageNumber |
integer |
No |
The page number of the code configuration list. Minimum value: 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page in a paged query. Default value: 20. |
10 |
| SortBy |
string |
No |
The field used for sorting. Valid values:
|
GmtModifyTime |
| Order |
string |
No |
The sort order for the specified field in a paged query. Valid values:
|
desc |
| WorkspaceId |
string |
No |
The workspace ID. This parameter is required. For information about how to obtain the workspace ID, see ListWorkspaces. |
1234 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| CodeSources |
array |
The list of code source configurations. |
|
| CodeSourceItem |
The code configuration details. |
||
| TotalCount |
integer |
The total number of code source configurations that match the filter conditions. |
2 |
| RequestId |
string |
The request ID. |
5A14FA81-DD4E-******-6343FE44B941 |
Examples
Success response
JSON format
{
"CodeSources": [
{
"CodeSourceId": "code-202**********",
"DisplayName": "MyCodeSourceName1",
"Description": "code source of dlc examples",
"CodeRepo": "https://code.aliyun.com/****",
"CodeBranch": "master",
"CodeCommit": "44da10**********",
"CodeRepoUserName": "user",
"CodeRepoAccessToken": "",
"Accessibility": "PUBLIC",
"UserId": "1157290171663117",
"WorkspaceId": "1234",
"GmtCreateTime": "2021-01-18T12:52:15Z",
"GmtModifyTime": "2021-01-18T12:52:15Z",
"MountPath": "/root/code/",
"CloneType": 0
}
],
"TotalCount": 2,
"RequestId": "5A14FA81-DD4E-******-6343FE44B941"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.