Obtaining the List of Repository Groups and Repositories in a Project
Function
This API is used to obtain the list of repository groups and repositories in a project.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
codeartsrepo:repository:getRepository |
Read |
- |
- |
- |
- |
URI
GET https://{hostURL}/v4/projects/{project_id}/subgroups-and-repositories
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition You can obtain the unique project identifier, 32-character project UUID, by calling the API used to query the project list. Range String length: 32 characters. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
filter |
No |
Integer |
Definition Search criteria, name. Value range: 1~2147483647 |
|
order_by |
No |
String |
Definition Sorting order. id: unique identifier. name: name. created_at: creation time. updated_at: update time. Default value: updated_at Enumeration values:
|
|
sort |
No |
String |
Definition Sorting order. asc: ascending. desc: descending Default value: desc Enumeration values:
|
|
archived |
No |
Boolean |
Definition Archived or not. Default value: false |
|
offset |
No |
Integer |
Definition Offset, which starts from 0. Value range: 0~2147483647 Default value: 0 |
|
limit |
No |
Integer |
Definition Number of returned records. Value range: 1~100 Default value: 20 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token. Constraints N/A Range 1–100,000 characters. Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
[items] |
Array of SubgroupAndProjectBaseDto objects |
Definition: List of repository groups and repositories in a project. |
|
Parameter |
Type |
Description |
|---|---|---|
|
project_id |
String |
Definition: Project ID. Value range: 1 to 1,000 characters. |
|
project_name |
String |
Definition: Project name. Value range: 1 to 1,000 characters. |
|
role_namecn |
String |
Definition: Role name in Chinese. Value range: 1 to 1,000 characters. |
|
role_nameen |
String |
Definition: Role name in English. Value range: 1 to 1,000 characters. |
|
full_name |
String |
Definition: Full name. Value range: 1 to 1,000 characters. |
|
full_path |
String |
Definition: Full path. Value range: 1 to 1,000 characters. |
|
created_at |
String |
Definition: Creation time. Value range: 1 to 1,000 characters. |
|
updated_at_timestamp |
String |
Definition: Update timestamp. Value range: 1 to 1,000 characters. |
|
star_time |
String |
Definition: Start timestamp. Value range: 1 to 1,000 characters. |
|
starred |
Boolean |
Definition: Whether to add it to favorites. |
|
develop_mode |
String |
Definition: Development mode. Normal: CR. Value range: 1 to 1,000 characters. |
|
id |
Integer |
Definition: Repository or repository group ID. Value range: 1~2147483647 |
|
name |
String |
Definition: Repository group or repository name. Value range: 1 to 1,000 characters. |
|
path |
String |
Definition: Path. Value range: 1 to 1,000 characters. |
|
group_level |
Integer |
Definition: Repository group level. Value range: 1~2147483647 |
|
description |
String |
Definition: Description of the repository group or repository. Value range: 1 to 1,000 characters. |
|
subgroup_count |
Integer |
Definition: Number of child repository groups. Value range: 1~2147483647 |
|
project_count |
Integer |
Definition: Number of repositories. Value range: 1~2147483647 |
|
group_role |
Integer |
Definition: Repository group role. Value range: 1~2147483647 |
|
group_members_count |
Integer |
Definition: Number of members in a repository group. Value range: 1~2147483647 |
|
descendant_type |
String |
Definition: Resource type: group or project. Value range: 1 to 1,000 characters. |
|
visibility_level |
Integer |
Definition: Visibility level: 0 (private) or 20 (public). Value range: 1~2147483647 |
|
visibility |
String |
Definition: Visibility: private or public. Value range: 1 to 1,000 characters. |
|
is_project_admin |
Integer |
Definition: Whether the current user is the project creator. Value range: 1~2147483647 |
|
is_group_creator |
Integer |
Definition: Whether the current user is the creator of a repository group. Value range: 1~2147483647 |
|
is_repo_creator |
Integer |
Definition: Whether the current user is the repository creator. Value range: 1~2147483647 |
|
role_show_flag |
Integer |
Definition: Role display flag. Value range: 1~2147483647 |
|
uuid |
String |
Definition: Repository UUID. Value range: 1 to 1,000 characters. |
|
forks_count |
Integer |
Definition: Number of forks. Value range: 1~2147483647 |
|
is_kia |
Boolean |
Definition: Whether it is Kia. |
|
is_owner |
Boolean |
Definition: Owner or not. |
|
archived |
Boolean |
Definition: Whether it is archived. |
|
last_repository_updated_at |
String |
Definition: Last update time of the repository. Value range: 1 to 1,000 characters. |
|
open_merge_requests_count |
Integer |
Definition: Number of enabled MRs. Value range: 1~2147483647 |
|
all_merge_requests_count |
Integer |
Definition: Total number of MRs. Value range: 1~2147483647 |
|
project_role |
Integer |
Definition: Repository role. Value range: 1~2147483647 |
|
project_members_count |
Integer |
Definition: Number of forks. Value range: 1~2147483647 |
|
project_creator |
ProjectCreatorDto object |
Definition: Project creator. |
|
star_count |
Integer |
Definition: Number of forks. Value range: 1~2147483647 |
|
tag_list |
Array of strings |
Definition: Tag list. |
|
http_url_to_repo |
String |
Definition: HTTP URL of the repository. Value range: 1 to 1,000 characters. |
|
ssh_url_to_repo |
String |
Definition: SSH URL of the repository. Value range: 1 to 1,000 characters. |
|
status |
Integer |
Definition: Status. Value range: 1~2147483647 |
|
active_statistic |
Array of integers |
Definition: Active user statistics. Value range: 1~2147483647 |
|
security_tag |
String |
Definition: Security tag. Value range: 1 to 1,000 characters. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
Integer |
Definition: Unique ID. Value range: 1~2147483647 |
|
name |
String |
Definition: Name. Value range: 1 to 1,000 characters. |
|
username |
String |
Definition: iam_id. Value range: 1 to 1,000 characters. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition Error code. |
|
error_msg |
String |
Definition Error message. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition Error code. |
|
error_msg |
String |
Definition Error message. |
Example Requests
GET https://{endpoint}/v4/projects/{project_id}/subgroups-and-repositories?offset=0&limit=20
Example Responses
Status code: 200
Obtain the list of repository groups and repositories in a project.
[ {
"project_id" : "c65b44ca43b04961860e728cb91acfc6",
"project_name" : "Null: Project name",
"role_namecn" : "Project administrator",
"role_nameen" : "project_admin",
"full_name" : "p_group3",
"full_path" : "p_group3",
"created_at" : "2025-06-03T22:45:31.000+08:00",
"updated_at_timestamp" : 1748904331000,
"star_time" : 1749955042000,
"starred" : false,
"develop_mode" : "normal",
"id" : 2111919928,
"name" : "p_group3",
"path" : "p_group3",
"group_level" : 1,
"description" : null,
"subgroup_count" : 1,
"project_count" : 0,
"group_role" : 50,
"group_members_count" : 2,
"descendant_type" : "Group",
"visibility_level" : 0,
"visibility" : "private",
"is_project_admin" : 1,
"is_group_creator" : 1,
"is_repo_creator" : 0,
"role_show_flag" : 6
} ]
Status code: 401
Unauthorized
{
"error_code" : "DEV.00000003",
"error_msg" : "Authentication information expired."
}
Status code: 403
Bad Request
{
"error_code" : "CH.004403",
"error_msg" : "Insufficient permissions. Apply for the required permissions and try again."
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Obtain the list of repository groups and repositories in a project. |
|
401 |
Unauthorized |
|
403 |
Bad Request |
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