Querying Code Repository Information
Function
This API is used to query the details of a code repository.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{cloud_project_id}/code/repositories/page
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
cloud_project_id |
Yes |
String |
Definition: 32-character UUID of a CodeArts project, which must be unique. Constraints: N/A Value range: The value contains 32 characters. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
repoType |
Yes |
String |
Definition: Code repository type. You can view the supported code repository types on the page for creating a pipeline. Constraints: N/A Range: The value varies depending on the region situation. Default value: N/A |
|
query |
No |
String |
Definition: Query parameter. Constraints: N/A Value range: N/A Default value: N/A |
|
workspace |
No |
String |
Definition: Workspace. Constraints: N/A Value range: N/A Default value: N/A |
|
authEndpoint |
No |
String |
Definition: Authentication endpoint. Constraints: N/A Value range: N/A Default value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
per_page |
Integer |
Definition: Page size for pagination query. Range:
NOTE:
0
|
|
page |
Integer |
Definition: Page number for pagination query. Range:
NOTE:
0
|
|
total |
Integer |
Definition: Total number of queried code repositories. Range: ≥ 0 |
|
data |
Array of Repositories objects |
Definition: Code repository details. Constraints: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition: Unique identifier of the code repository. It can be viewed in the code repository. Range: N/A |
|
name |
String |
Definition: Code repository name. Range: N/A |
|
http_url |
String |
Definition: URL of the code repository. Range: N/A |
|
git_url |
String |
Definition: Code repository Git address. Range: N/A |
|
human_name |
String |
Definition: Alias defined by a code repository. Range: N/A |
|
show_group_name |
String |
Definition: Alias of a code repository group. Range: N/A |
|
group_name |
String |
Definition: Name of a code repository group. Range: N/A |
Example Requests
GET https://{endpoint}/v2/63673ced4043423d95da814b474c55b7/code/repositories/page?repoType=codehub&authEndpoint=&query=&offset=0&workspace=&limit=30&_=1763890968971
Example Responses
Status code: 200
OK
{
"data" : [ {
"id" : "8078143",
"name" : "phoenix-sample",
"http_url" : "https://codehub-cn-south-1.devcloud.huaweicloud.com/63673ced4043423d95da814b474c55b7/phoenix-sample.git",
"git_url" : "git@codehub-cn-south-1.devcloud.huaweicloud.com:63673ced4043423d95da814b474c55b7/phoenix-sample.git",
"human_name" : null,
"show_group_name" : null,
"group_name" : "63673ced4043423d95da814b474c55b7"
} ],
"per_page" : 30,
"page" : 1,
"total" : 1
}
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