Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ Tenant/ Obtaining the Tenant Repository List
Updated on 2026-01-27 GMT+08:00

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.

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/tenant/repositories

Table 1 Query Parameters

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:

  • 0: normal

  • 3: frozen

  • 4: closed

  • 5: clearing

  • 7: deleting

Enumeration values:

  • 0

  • 3

  • 4

  • 5

  • 7

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:

  • asc: The value is returned in ascending order.

  • desc: The value is returned in descending order.

Default value:

desc

Enumeration values:

  • asc

  • desc

sort_field

No

String

Definition:

Sorting field

  • owner: repository owner

  • capacity: used space

  • status: repository status

  • create_time: creation time

  • member_number: number of members

  • repository_name: repository name

Default value:

create_time

Enumeration values:

  • owner

  • capacity

  • status

  • create_time

  • member_number

  • repository_name

locked

No

Boolean

Definition

Locked or not.

Constraints

If this parameter is not transferred, all data is queried.

Range

  • true: locked repository.

  • false: unlocked repository.

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

Table 2 Request header 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

Table 3 Response header parameters

Parameter

Type

Description

X-Total

String

Total number of results of the current request

Table 4 Response body parameters

Parameter

Type

Description

[items]

Array of TenantRepositoryDto objects

Repository list

Table 5 TenantRepositoryDto

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:

  • 0: normal

  • 3: frozen

  • 4: closed

  • 5: clearing

  • 7: deleting

Enumeration values:

  • 0

  • 3

  • 4

  • 5

  • 7

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

locked

Boolean

Definition

Locked or not.

Range

  • true: yes.

  • false: no.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

error_msg

String

Definition

Error message.

Status code: 403

Table 7 Response body parameters

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.