Help Center/ CodeArts Check/ API Reference/ APIs/ Task Management/ Querying Tenant Configuration
Updated on 2026-08-10 GMT+08:00

Querying Tenant Configuration

Function

This API is used to query tenant configuration.

Calling Method

For details, see Calling APIs.

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

codeartscheck::getConfig

Read

-

-

-

-

URI

GET /v1/tenant-configs

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

search

No

String

Definition:

Keyword search (prefix matching)

Constraints:

N/A

Value range:

N/A

Default value:

N/A

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

The length is the value of [1-100000].

Default Value

N/A

Content-Type

Yes

String

Definition

Encoding format.

Constraints

N/A

Range

N/A

Default Value

application/json: The return value is in JSON format for any input value.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

data

Array of TenantConfigInfo objects

Definition

Tenant configuration list.

total

Integer

Definition

Total number of tenant configurations.

Range

N/A

Table 4 TenantConfigInfo

Parameter

Type

Description

id

String

Definition

ID of the tenant configuration.

Range

N/A

key

String

Definition

Key of the tenant configuration. If the tenant check language is configured, the value starts with languageFileSuffix_ followed by the language.

Range

N/A

value

String

Definition

Value of the tenant configuration. If the tenant check language is configured, the value indicates the file name extension of the current language. Multiple file name extensions are separated by commas (,).

Range

N/A

description

String

Definition

Description of the tenant configuration.

Range

N/A

create_time

String

Definition

Time when a tenant configuration is created.

Range

N/A

last_update_time

String

Definition

Last update time of a tenant configuration.

Range

N/A

creator

String

Definition

Creator of a tenant configuration.

Range

N/A

last_reviser

String

Definition

Last modifier of a tenant configuration.

Range

N/A

domain_id

String

Definition

Tenant ID, which is the same as the IAM tenant ID.

Range

N/A

has_default_config

Boolean

Definition

Whether the default configuration item exists. For example, for the tenant language, the system language has a default file suffix, so the value is true. The tenant-defined language does not have a default file suffix, so the value is false.

Range

N/A

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Example Requests

Query the system configuration whose prefix is languageFileSuffix. Actually, the language check configuration of the tenant is queried.

GET https://{endpoint}/v1/tenant-configs?search=languageFileSuffix

Example Responses

Status code: 200

Tenant configuration list obtained.

{
  "data" : [ {
    "id" : "044247bbd19611ef8c02fa163eed4919",
    "key" : "languageFileSuffix_SCALA",
    "value" : "scala",
    "description" : "File name extension of the Scala language.",
    "create_time" : "2025-01-13 10:18:37.0",
    "creator" : "SYSTEM",
    "last_reviser" : "SYSTEM",
    "domain_id" : null,
    "has_default_config" : null,
    "last_update_time" : "2025-01-13 10:18:37.0"
  }, {
    "id" : "07b84301d19611ef8c02fa163eed4919",
    "key" : "languageFileSuffix_PHP",
    "value" : "php,php3,php4,php5,phps,aw,ctp,phakefile,php_cs,php_cs.dist,phpt,phtml",
    "description" : "File name extension of the PHP language.",
    "create_time" : "2025-01-13 10:18:37.0",
    "creator" : "SYSTEM",
    "last_reviser" : "SYSTEM",
    "domain_id" : null,
    "has_default_config" : null,
    "last_update_time" : "2025-01-13 10:18:37.0"
  } ],
  "total" : 2
}

Status code: 400

A request error occurred.

{
  "error_code" : "CC.xxxxxxxx.400",
  "error_msg" : "Verify request parameter failed. Check whether the request parameters are correct."
}

Status code: 401

The permission is insufficient.

{
  "error_code" : "CC.00000003",
  "error_msg" : "Authentication information expired."
}

Status Codes

Status Code

Description

200

Tenant configuration list obtained.

400

A request error occurred.

401

The permission is insufficient.

Error Codes

See Error Codes.