Obtaining the Tenant Repository List
Function
This API is used to query the list of all repositories that occupy resources under a tenant.
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/tenant/repositories
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| repository_name | No | String | Definition: Repository name Value range: 1 to 128 characters. |
| member_number | No | Integer | Definition: Number of members Value range: 1~2147483647 |
| status | No | Integer | Definition: Repository status Value range: Enumeration values: |
| owner | No | String | Definition: Repository owner Value range: 1 to 128 characters. |
| created_after | No | String | Definition: Filter the repositories created after this specified time. |
| created_before | No | String | Definition: Filter the repositories created before this specified time. |
| sort | No | String | Definition: Sorting order of the result set Constraints: This parameter is used together with sort_field. Value range: Default value: desc Enumeration values: |
| sort_field | No | String | Definition: Sorting field Default value: create_time Enumeration values: |
| 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 |
|---|---|---|
| X-Total | String | Total number of results of the current request |
| Parameter | Type | Description |
|---|---|---|
| [items] | Array of TenantRepositoryDto objects | Repository list |
| Parameter | Type | Description |
|---|---|---|
| owner | String | Definition: Repository owner Value range: 1 to 128 characters. |
| capacity | Double | Definition: Repository capacity (MB, 2 decimal places) Value range: N/A Value range: 0~30720 |
| status | Integer | Definition: Repository status Value range: Enumeration values: |
| moderation_result | Boolean | Definition: Content approving result Value range: true: approved false: rejected |
| create_time | String | Definition: Creation time Value range: N/A |
| member_number | Integer | Definition: Number of members Value range: N/A Value range: 1~1000 |
| repository_id | Integer | Definition: Repository ID Value range: N/A Value range: 1~2147483647 |
| repository_name | String | Definition: Repository name Value range: N/A |
| project_name | String | Definition: Project name Value range: N/A |
| project_id | String | Definition: Project ID Value range: N/A |
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/tenant/repositories Example Responses
Status code: 200
OK
[ {
"owner" : "CodeHub_beta_test",
"capacity" : 0.04,
"status" : 0,
"moderation_result" : true,
"create_time" : "2025-09-23T16:05:39.000+08:00",
"member_number" : 22,
"repository_id" : 2112046425,
"repository_name" : "ddddddddd",
"project_name" : "lh_test",
"project_id" : "c1f7364751e0406b8d9a46f492cba662"
} ] Status code: 401
Unauthorized
{
"error_code" : "DEV.00000003",
"error_msg" : "Authentication information expired."
} Status code: 403
Bad Request
{
"error_code" : "DEV-23-50804",
"error_msg" : "Insufficient permissions. Apply for the required permissions and try again."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 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.