Querying All Repositories in a Project
Description
This API is used to obtain the repository list. Fuzzy query is supported: If the project UUID is not specified, fuzzy search by repository name or project name is supported. Otherwise, only fuzzy search by repository name is supported.
URI
GET /v2/projects/{project_uuid}/repositories
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_uuid |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
page_index |
No |
Integer |
Page index, starting from 1 |
|
page_size |
No |
Integer |
Record number on each page |
|
search |
No |
String |
Search keyword |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
Error object |
Response error |
|
result |
RepoListInfoV2 object |
Response result |
|
status |
String |
Response status |
|
Parameter |
Type |
Description |
|---|---|---|
|
repositories |
Array of RepoInfoV2 objects |
Repository list |
|
total |
Integer |
Total number of repositories |
|
Parameter |
Type |
Description |
|---|---|---|
|
created_at |
String |
Creation time |
|
creator_name |
String |
Username of the creator. If the user is a tenant, the username is the same as the tenant name. |
|
domain_name |
String |
Tenant name of the creator |
|
group_name |
String |
Repository group name (Segment following the domain name and before the repository name in the clone address. Example: git@repo.alpha.devcloud.intest.com:Demo00228/testword.git. Repository group name: Demo00228.) |
|
https_url |
String |
URL for cloning repositories using HTTPS |
|
iam_user_uuid |
String |
IAM user UUID |
|
is_owner |
Integer |
Whether the current user is the repository creator. 1: Yes. 0: No |
|
lfs_size |
String |
Repository LFS capacity in MB. If the capacity is greater than 1,024 MB, the unit is GB. |
|
project_is_deleted |
String |
Whether the project is deleted |
|
project_uuid |
String |
Project ID. For details, see Obtaining a Project ID. |
|
repository_id |
Integer |
Repository primary key ID |
|
repository_name |
String |
Repository name |
|
repository_size |
String |
Total repository capacity = Repository LFS capacity + Git repository capacity. The unit is MB. If the capacity is greater than 1,024 MB, the unit is GB. |
|
repository_uuid |
String |
Repository UUID returned by the CreateRepository API. |
|
ssh_url |
String |
URL for cloning repositories using SSH |
|
star |
Boolean |
Whether you have followed the repository |
|
status |
Integer |
Repository status. 0: Created. 1: Creating. 2: Failed. 3: Frozen. 4: Closed. |
|
updated_at |
String |
Update time |
|
userRole |
Integer |
Your permission in the repository. 20: Read-only member. 30: Common member. 40: Administrator. |
|
visibility_level |
Integer |
Visibility. 0: Private. 20: Public |
|
web_url |
String |
Web URL. If you access it, the repository details page is displayed. |
Request Examples
GET https://{endpoint}/v2/projects/{project_uuid}/repositories
Response Examples
Status code: 200
Request succeeded
{
"result" : {
"total" : 14,
"repositories" : {
"repository_uuid" : "d0457f74cc5b43d989ded7248f71b4e5",
"repository_id" : 468480,
"repository_name" : "CreatRepository_2qD5i",
"ssh_url" : "git@repo.alpha.devcloud.intest.com:Demo00228/CreatRepository_2qD5i.git",
"https_url" : "https://repo.alpha.devcloud.intest.com/Demo00228/CreatRepository_2qD5i.git",
"group_name" : "Demo00228",
"web_url" : "https://alpha.devcloud.intest.com/repo/468480/home",
"visibility_level" : 0,
"created_at" : "2019-10-15 09:40:26",
"updated_at" : "2019-10-15 09:40:26",
"repository_size" : "0.06M",
"lfs_size" : "0.00M",
"creator_name" : "repo",
"domain_name" : "repo",
"star" : false,
"status" : 0,
"is_owner" : 1,
"iam_user_uuid" : "a618e34bd5704be3ae3395dfede06041",
"project_uuid" : "4838955a48e2492bbe44b31bc4c272f6",
"project_is_deleted" : "false",
"userRole" : null
}
},
"status" : "success"
}
Status Codes
|
Status Codes |
Description |
|---|---|
|
200 |
Request succeeded |
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