Esta página aún no está disponible en su idioma local. Estamos trabajando arduamente para agregar más versiones de idiomas. Gracias por tu apoyo.
Querying All Repositories of a User
Function
This API is used to obtain all repository information of a user.
URI
GET /v2/projects/repositories
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
page_index |
No |
Integer |
Explanation: Page index. Range: Minimum value: 1 Maximum value: 2147483647 Default value: 1 |
page_size |
No |
Integer |
Explanation: Number of records on each page. Range: Minimum value: 1 Maximum value: 100 Default value: 100 |
search |
No |
String |
Explanation: Search keyword. Range: 1–512 characters. Default value: Empty. |
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. Range: None |
result |
RepoListInfoV2 object |
Explanation: Response result. Range: None |
status |
String |
Explanation: Response status of the API. Range:
|
Parameter |
Type |
Description |
---|---|---|
code |
String |
Explanation: Error code returned when the API fails to be called. Range:
|
message |
String |
Explanation: Error code returned when the API fails to be called. Range:
|
Parameter |
Type |
Description |
---|---|---|
repositories |
Array of RepoInfoV2 objects |
Explanation: Repository list. |
total |
Integer |
Explanation: Total number of repositories. Range: 0–2147483647 |
Parameter |
Type |
Description |
---|---|---|
created_at |
String |
Explanation: Creation time. Constraints: Format: yyyy-MM-dd HH:mm:ss |
creator_name |
String |
Explanation: Name of the creator. Range: 128 digits and letters. |
domain_name |
String |
Explanation: Tenant name of the creator. Range: 128 digits and letters. |
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: 2–255 characters. |
https_url |
String |
Explanation: HTTPS repository address. Range: Max. 2,000 characters. |
iam_user_uuid |
String |
Explanation: IAM user ID. Range: 32 digits and letters. |
is_owner |
Integer |
Explanation: Whether the user is the repository creator. Range: 1: Yes 0: No |
lfs_size |
String |
Explanation: Repository LFS capacity. Constraints: Measured in MB or GB, with two decimal places. |
project_is_deleted |
String |
Explanation: Whether the project has been deleted. Range: false: No true: Yes |
project_uuid |
String |
Explanation: Project ID. For details, see Obtaining a Project ID. Range: 32 digits and letters. |
repository_id |
Integer |
Explanation: Repository ID. Range: 0–2147483647 |
repository_name |
String |
Explanation: Repository name. Range: 2–255 characters. |
repository_size |
String |
Explanation: Total repository capacity = Repository LFS capacity + Git repository capacity. Constraints: Measured in MB or GB, with two decimal places. |
repository_uuid |
String |
Explanation: Repo UUID, which is returned by the CreateRepository API. Constraints: 32 digits and letters. |
ssh_url |
String |
Explanation: SSH repository address. Range: Max. 2,000 characters. |
star |
Boolean |
Explanation: Whether you have followed the repository. Range: false: No true: Yes |
status |
Integer |
Explanation: Repository status. Range: 0: The repository has been created. 1: The repository is being created. 2: The creation failed. 3: The repository is frozen. 4: The repository is closed. |
updated_at |
String |
Explanation: Update time. Constraints: Format: yyyy-MM-dd HH:mm:ss |
userRole |
Integer |
Explanation: Your role in the repository. Constraints: 20: Read-only member 30: Common member 40: Administrator |
visibility_level |
Integer |
Explanation: Repository visibility. Range: 0: Private repository 20: Public repository |
web_url |
String |
Explanation: Web URL, which redirects you to the repository details page. Range: Max. 2,000 characters. |
Example Requests
GET https://{endpoint}/v2/projects/repositories
Example Responses
Status code: 200
OK
{
"result" : {
"total" : 29,
"repositories" : {
"repository_uuid" : "0bf1e7ceb5b341318cb72b42901abe54",
"repository_id" : 468564,
"repository_name" : "test",
"ssh_url" : "git@repo.alpha.devcloud.test.com:test_new00001/test.git",
"https_url" : "https://repo.alpha.devcloud.test.com/test_new00001/test.git",
"group_name" : "test_new00001",
"web_url" : "https://alpha.devcloud.test.com/repo/468564/home",
"visibility_level" : 0,
"created_at" : "2019-10-15 11:00:11",
"updated_at" : "2019-10-15 11:00:11",
"repository_size" : "0.05M",
"lfs_size" : "0.00M",
"creator_name" : "repo",
"domain_name" : "repo",
"star" : true,
"status" : 0,
"is_owner" : 1,
"iam_user_uuid" : "a618e34bd5704be3ae3395dfede06041",
"project_uuid" : "dc19b3ca6f334ce894a1ec467689797d",
"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.