ListGroupRepositories - List group repositories
Lists repositories in a code group, with support for pagination, search, and including repositories from subgroups.
|
Applicable editions |
Central edition, Region edition |
Service endpoints and authorization
- Obtain the service endpoint: Replace {domain} in the API request syntax.
- Obtain a personal access token.
- Obtain the
organizationId: Required for Central edition only. Go to the Basic Information page of the organization management console to get the organization ID.
|
Product |
Resource |
Required permissions |
|
Code Management |
code group |
Read-only |
Request syntax
Central edition
GET https://{domain}/oapi/v1/codeup/organizations/{organizationId}/groups/{groupId}/repositories
Region edition
GET https://{domain}/oapi/v1/codeup/groups/{groupId}/repositories
Request headers
|
Parameter |
Type |
Required |
Description |
Example |
|
x-yunxiao-token |
string |
Yes |
Your personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
In |
Required |
Description |
Example |
|
organizationId |
string |
path |
|
The organization ID. |
60d54f3daccf2bbd6659f3ad |
|
groupId |
integer |
path |
Yes |
The code group ID. |
1 |
|
page |
integer |
query |
No |
The page number. Defaults to 1. |
1 |
|
perPage |
integer |
query |
No |
The page size. Defaults to 20. |
20 |
|
search |
string |
query |
No |
A keyword for searching repositories by name. |
TestRepo |
|
includeSubgroups |
boolean |
query |
No |
Whether to include repositories from subgroups. Defaults to false. |
false |
Request examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/groups/1/repositories?page=1&perPage=20&search=TestRepo&includeSubgroups=false' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'GET' \
'https://{domain}/oapi/v1/codeup/groups/1/repositories?page=1&perPage=20&search=TestRepo&includeSubgroups=false' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example |
| - |
array |
The list of repositories. |
|
| - |
object |
Details of the repository. |
|
| accessLevel |
integer |
The current user's access level for the repository. Valid values: |
40 |
| archived |
boolean |
Indicates whether the repository is archived. |
false |
| avatarUrl |
string |
The avatar URL. |
https://example/example/w/100/h/100 |
| createdAt |
string |
The time the repository was created. |
2024-10-05T15:30:45Z |
| creatorId |
integer |
The ID of the user who created the repository. |
1 |
| demoProject |
boolean |
Indicates whether this is a demo repository. |
false |
| description |
string |
The repository description. |
demo repo |
| encrypted |
boolean |
Indicates whether the repository is encrypted. |
false |
| id |
integer |
The repository ID. |
2813489 |
| lastActivityAt |
string |
The time of the last activity on the repository. |
2024-10-05T15:30:45Z |
| name |
string |
The repository name. |
demo-repo |
| nameWithNamespace |
string |
The full repository name, including the full group name. |
60de7a6852743a5162b5f957 / DemoRepo |
| namespaceId |
integer |
The ID of the parent namespace. |
2813489 |
| path |
string |
The repository path. |
demo-repo |
| pathWithNamespace |
string |
The full repository path, including the full group path. |
60de7a6852743a5162b5f957/DemoRepo |
| repositorySize |
string |
The repository size (MB). |
1 |
| starCount |
integer |
The number of stars the repository has. |
1 |
| starred |
boolean |
Indicates whether the current user has starred the repository. |
false |
| updatedAt |
string |
The time the repository was last updated. |
2024-10-05T15:30:45Z |
| visibility |
string |
The visibility of the repository. Valid values: |
private |
| webUrl |
string |
The web URL of the repository. |
http://example.com/org-demo/example-repo |
Response example
[
{
"accessLevel": 40,
"archived": false,
"avatarUrl": "https://example/example/w/100/h/100",
"createdAt": "2024-10-05T15:30:45Z",
"creatorId": 1,
"demoProject": false,
"description": "demo repo",
"encrypted": false,
"id": 2813489,
"lastActivityAt": "2024-10-05T15:30:45Z",
"name": "demo-repo",
"nameWithNamespace": "60de7a6852743a5162b5f957 / DemoRepo",
"namespaceId": 2813489,
"path": "demo-repo",
"pathWithNamespace": "60de7a6852743a5162b5f957/DemoRepo",
"repositorySize": "1",
"starCount": 1,
"starred": false,
"updatedAt": "2024-10-05T15:30:45Z",
"visibility": "private",
"webUrl": "http://example.com/org-demo/example-repo"
}
]
Response headers
|
Parameter |
Description |
Example |
|
x-next-page |
The next page number. |
3 |
|
x-page |
The current page number. |
2 |
|
x-per-page |
The page size. |
20 |
|
x-prev-page |
The previous page number. |
1 |
|
x-request-id |
The request ID. |
37294673-00CA-5B8B-914F-A8B35511E90A |
|
x-total |
The total number of items. |
50 |
|
x-total-pages |
The total number of pages. |
3 |
Error codes
For a list of API error codes, see the Error Code Center.