Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ Tenant/ Obtaining the List of Encrypted Repositories of the Current Tenant
Updated on 2026-05-12 GMT+08:00

Obtaining the List of Encrypted Repositories of the Current Tenant

Function

This API is used to obtain the list of encrypted repositories of the current 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

No identity policy-based permission required for calling this API.

URI

GET https://{hostURL}/v4/tenants/{tenant_id}/repo-encryption/repositories

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

tenant_id

Yes

String

Definition

Tenant ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

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

order_by

No

String

Definition

Sorting field. If this field is not passed, no sorting will be performed.

Default value:

repoName

Enumeration values:

  • repoName

  • ownerName

sort

No

String

Definition

Sorting order. asc: ascending. desc: descending

Default value:

desc

Enumeration values:

  • asc

  • desc

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. You can obtain the token by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Constraints

N/A

Range

A string that can contain 1 to 100,000 characters.

Default Value

N/A

Response Parameters

Status code: 202

Table 4 Response body parameters

Parameter

Type

Description

[items]

Array of RepoEncryptionDto objects

Code repository encryption object information.

Table 5 RepoEncryptionDto

Parameter

Type

Description

repo_id

Integer

Definition

Code repository ID.

Value range:

1~2147483647

repo_name

String

Definition

Code repository name.

Range

The value must contain 1 to 1,000 characters.

full_path

String

Definition

Full path of the code repository.

Range

The value must contain 1 to 1,000 characters.

project_id

String

Definition

Project ID.

Range

The value must contain 1 to 1,000 characters.

project_name

String

Definition

Project name.

Range

The value must contain 1 to 1,000 characters.

owner_id

Integer

Definition

ID of the code repository owner.

Value range:

1~2147483647

owner_iam_id

String

Definition

IAM ID of the code repository owner.

Range

The value must contain 1 to 1,000 characters.

owner_tenant_name

String

Definition

Tenant ID of the code repository owner.

Range

The value must contain 1 to 1,000 characters.

owner_nick_name

String

Definition

Alias of the code repository owner.

Range

The value must contain 1 to 1,000 characters.

owner_name

String

Definition

Name of the code repository owner.

Range

The value must contain 1 to 1,000 characters.

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/tenants/{tenant_id}/repo-encryption/repositories?offset=0&limit=10

Example Responses

Status code: 202

Obtain the list of encrypted repositories of the current tenant.

[ {
  "repo_id" : 2112117302,
  "repo_name" : "WorkspaceSecCP",
  "full_path" : "WorkspaceSecCP",
  "project_id" : "80ffa3ec7a6d4ba9ba33aaddce828d26",
  "project_name" : "sec_cz_test",
  "owner_id" : 9124,
  "owner_iam_id" : null,
  "owner_tenant_name" : "devcloud_codehub_l00314597_01",
  "owner_nick_name" : "dev",
  "owner_name" : "CodeHub_beta_dev"
} ]

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

202

Obtain the list of encrypted repositories of the current tenant.

401

Unauthorized

403

Bad Request

Error Codes

See Error Codes.