Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.
Querying All Repositories in a Project
Function
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 |
Explanation: Project ID. For details, see Obtaining a Project ID. Constraints: Mandatory Range: 32 characters. Default value: None |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
page_index |
No |
Integer |
Explanation: Page index, starting from 1. Constraints: None Range: 1-2,147,483,647 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: Character string. 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: Mandatory Range: 1–100,000 characters. Default value: None |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Explanation: Response error. |
result |
RepoListInfoV2 object |
Explanation: Response result. |
status |
String |
Explanation: Response status. Range:
|
Parameter |
Type |
Description |
---|---|---|
code |
String |
Explanation: Error code. Range: See Error Codes. |
message |
String |
Explanation: Error message. Range: Character string. |
Parameter |
Type |
Description |
---|---|---|
repositories |
Array of RepoInfoV2 objects |
Explanation: Repository list. |
total |
Integer |
Explanation: Total number of repositories. Range: 1–2147483647 |
Parameter |
Type |
Description |
---|---|---|
created_at |
String |
Explanation: Creation time. Range: Character string. |
creator_name |
String |
Explanation: Username of the creator. If the user is a tenant, the username is the same as the tenant name. Range: Character string. |
domain_name |
String |
Explanation: Tenant name of the creator. Range: Character string. |
group_name |
String |
Explanation: Repository group name (the segment between the domain name and repository name in a clone address). Example: Demo00228 in git@repo.alpha.devcloud.test.com:Demo00228/testword.git Range: Character string. |
https_url |
String |
Explanation: URL for cloning a repository using HTTPS. Range: Character string. |
iam_user_uuid |
String |
Explanation: IAM user UUID. Range: Character string. |
is_owner |
Integer |
Explanation: Whether the current user is the repository creator. Range:
|
lfs_size |
String |
Explanation: Repository LFS capacity in MB. If the capacity is greater than 1,024 MB, the unit is GB. Range: Character string. |
project_is_deleted |
String |
Explanation: Whether the project has been deleted. Range: Character string. |
project_uuid |
String |
Explanation: Project ID. For details, see Obtaining a Project ID. Range: Character string. |
repository_id |
Integer |
Explanation: Repository primary key ID. Range: 1–2147483647 |
repository_name |
String |
Explanation: Repository name. Range: Character string. |
repository_size |
String |
Explanation: 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. Range: Character string. |
repository_uuid |
String |
Explanation: Repo UUID, which is returned by the CreateRepository API. Range: Character string. |
ssh_url |
String |
Explanation: URL for cloning a repository in SSH mode. Range: Character string. |
star |
Boolean |
Explanation: Whether you have followed the repository. Range:
|
status |
Integer |
Explanation: Repository status. Range:
|
updated_at |
String |
Explanation: Update time. Range: Character string. |
userRole |
Integer |
Explanation: Your permissions for the repository. Range:
|
visibility_level |
Integer |
Explanation: Visibility. Range:
|
web_url |
String |
Explanation: Web URL, which redirects you to the repository details page. Range: Character string. |
Example Requests
GET https://{endpoint}/v2/projects/{project_uuid}/repositories
Example Responses
Status code: 200
OK
{ "result" : { "total" : 14, "repositories" : { "repository_uuid" : "d0457f74cc5b43d989ded7248f71b4e5", "repository_id" : 468480, "repository_name" : "CreatRepository_2qD5i", "ssh_url" : "git@repo.test.com:Demo00228/CreatRepository_2qD5i.git", "https_url" : "https://test.com/Demo00228/CreatRepository_2qD5i.git", "group_name" : "Demo00228", "web_url" : "https://test.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 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