Help Center/ CodeArts Pipeline/ API Reference/ API/ Tenant-Level Policy Management/ Obtaining Open-Source Governance Policies
Updated on 2025-09-08 GMT+08:00

Obtaining Open-Source Governance Policies

Function

This API is used to obtain open-source governance policies.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{domain_id}/tenant/open-source/rule-sets/query

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

domain_id

Yes

String

Definition:

Tenant ID.

Constraints:

N/A

Value range:

The value consists of 32 characters, including digits and letters.

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

cloud_project_id

No

String

Definition:

Project ID. For details, see Obtaining a Project ID.

Constraints:

N/A

Value range:

The value consists of 32 characters, including digits and letters.

Default value:

N/A

Request Parameters

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

name

No

String

Definition:

Name of an open-source governance policy.

Constraints:

The policy name can contain only characters, letters, digits, hyphens (-), and underscores (_).

Value range:

Enter a maximum of 128 characters.

Default value:

N/A

creatorName

No

String

Definition:

Name of the creator of an open-source governance policy. The name can be used for fuzzy query.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

limit

No

Integer

Definition:

Number of records of each query.

Constraints:

N/A

Value range:

The value is no less than 0.

Default value:

N/A

offset

No

Integer

Definition:

Offset where the query starts.

Constraints:

N/A

Value range:

The offset value must be no less than 0.

Default value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

data

Array of SimpleRuleSetVO objects

Definition:

Policy details.

Value range:

N/A

total

Long

Definition:

Total number of items.

Value range:

The value is no less than 0.

Table 5 SimpleRuleSetVO

Parameter

Type

Description

id

String

Definition:

Policy ID.

Value range:

N/A

name

String

Definition:

Policy name.

Value range:

Enter a maximum of 128 characters.

level

String

Definition:

Scope identifier.

Value range:

tenant: tenant.

  • others: non-tenant.

is_valid

Boolean

Definition:

Whether this function takes effect.

Value range:

  • true: The function takes effect.

  • false: The function does not take effect.

version

String

Definition:

Rule template version.

Value range:

N/A

operator

String

Definition:

Latest operator.

Value range:

N/A

is_public

Boolean

Definition:

Whether the policy is a system policy.

Value range:

  • true: The policy is a system policy.

  • false: The policy is not a system policy.

is_legacy

Boolean

Definition:

Whether the data is from version 1.0.

Value range:

  • true: The data is from version 1.0.

  • false: The data is not from version 1.0.

operate_time

Integer

Definition:

Last operation time.

Value range:

N/A

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A

error_code

String

Parameter description:

Error code.

Value range:

N/A

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

OK

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.