Updated on 2025-09-08 GMT+08:00

Querying the Details of a Policy

Function

This API is used to query the details of a policy.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{cloudProjectId}/rule-sets/{ruleSetId}/detail

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

cloudProjectId

Yes

String

Project ID.

ruleSetId

Yes

String

Policy ID.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 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 3 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

Example Requests

GET https://{endpoint}/v2/2d09f712e9504b61b034cc8f40e475a8/rule-sets/842cacd3424a470eb410300b537fa756/detail

Example Responses

Status code: 200

Response body for querying policy details.

{
  "data" : [ {
    "id" : "842cacd3424a470eb410300b537fa756",
    "name" : "NewPolicy-20240625194201",
    "level" : "project",
    "version" : "efaddbfff5c742f781802004b888eccb",
    "is_valid" : true,
    "is_public" : false
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

Response body for querying policy details.

Error Codes

See Error Codes.