Obtaining the Lists of Sub-Repository Groups and Repositories in a Repository Group
Function
This API is used to obtain the sub-repository groups and repository lists of a repository group.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET https://{hostURL}/v4/groups/{group_id}/subgroups-and-repositories
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| group_id | Yes | Integer | Definition Repository group ID, which is the numeric ID next to Group ID on the repository group homepage. Value range: 1~2147483647 |
| 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 a token by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Constraints Mandatory. 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/groups/{group_id}/subgroups-and-repositories?offset=0&limit=20 Example Responses
Status code: 200
Obtain the sub-repository groups and repository lists of a repository group.
[ {
"project_id" : "c65b44ca43b04961860e728cb91acfc6",
"project_name" : null,
"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 sub-repository groups and repository lists of a repository group. |
| 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.