Obtaining Information About All Repositories in a Project
Function
This API is used to obtain the repository list. Fuzzy query is supported: If the project_id is not specified, fuzzy search by repository name or project name is supported. Otherwise, only fuzzy search by repository name is supported.
URI
GET /v1/projects/{project_uuid}/repositories
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_uuid |
Yes |
String |
Explanation: Project ID. For details, see Obtaining a Project ID. Constraints None. Range 32 digits and letters. Default value None. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
page_index |
No |
Integer |
Explanation: Page index. Constraints None. Range None. Default value 1 |
|
page_size |
No |
Integer |
Explanation: Number of records on each page. Constraints None. Range 1–100 Default value 20 |
|
search |
No |
String |
Explanation: Search keyword. Constraints None. Range None. Default value None. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Explanation User token. It can be obtained by calling the corresponding IAM API. The value of X-Subject-Token in the response header is the user token. Constraints None. Range 1–100,000 characters. Default value None. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
Error object |
Explanation: Response error. Range None |
|
result |
RepoListInfo object |
Explanation: Response result. Range None |
|
status |
String |
Explanation: Response status. Range
|
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Explanation: Error code. Range Max. 100 characters in the error code format. |
|
message |
String |
Explanation: Error message. Range None |
|
Parameter |
Type |
Description |
|---|---|---|
|
repositorys |
Array of RepoInfo objects |
Explanation: Repository list. Range None |
|
total |
Integer |
Explanation: Total number of repositories. Range None |
|
Parameter |
Type |
Description |
|---|---|---|
|
createAt |
String |
Explanation: Creation time. Range None |
|
groupName |
String |
Explanation: Repository group name (the segment between the domain name and repository name in a clone address. Example: Demo00228 in git@repo.example.com:Demo00228/testword.git). Range None |
|
httpUrl |
String |
Explanation: Repository https url Range None |
|
id |
String |
Explanation: Repository UUID Range 32 characters. |
|
name |
String |
Explanation: Repository name. Range None |
|
projectId |
String |
Explanation: Project ID. Range 32 characters. |
|
projectIsDelete |
String |
Whether the project is deleted. |
|
repoId |
String |
Explanation: Repository ID Range 1-40 |
|
sshUrl |
String |
Explanation: Repository ssh url |
|
visibilityLevel |
Integer |
Explanation: Visibility. 0: Private. 20: Public. Range
|
|
webUrl |
String |
Explanation: Repository web url Range None |
Example Requests
GET https://{endpoint}/v1/projects/{project_uuid}/repositories
Example Responses
Status code: 200
OK
{
"result" : {
"total" : 1,
"repositorys" : [ {
"id" : "d0457f74cc5b43d989ded7248f71b4e5",
"repoId" : "468480",
"name" : "CreatRepository_2qD5i",
""sshUrl" : "git@repo.example.com: Demo00228/CreatRepository_2qD5i.git",
"httpUrl" : "https://repo.example.com/Demo00228/CreatRepository_2qD5i.git",
"groupName" : "Demo00228",
"webUrl" : "https://repo.example.com/repo/468480/home",
"visibilityLevel" : 0,
"createAt" : "2019-10-15 09:40:26",
"projectId" : "4838955a48e2492bbe44b31bc4c272f6",
"projectIsDelete" : "false"
} ],
"status" : "success"
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot