Updated on 2025-11-12 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

id

String

Definition:

Rule template instance ID.

Value range:

N/A

name

String

Definition:

Rule template instance name.

Value range:

N/A

type

String

Definition:

Rule instance type.

Value range:

N/A

version

String

Definition:

Rule instance version.

Value range:

N/A

operator

String

Definition:

Latest operator of the rule instance.

Value range:

N/A

operate_time

Long

Definition:

Time when the rule was last operated.

Value range:

N/A

is_valid

Boolean

Definition:

Whether the rule instance takes effect.

Value range:

  • true: The rule takes effect.

  • false: The rule does not take effect.

level

String

Definition:

Effective level of a rule instance.

Value range:

N/A

is_public

Boolean

Definition:

Whether the rule instance is system-level.

Value range:

  • true: The rule instance is system-level.

  • false: The rule instance is not system-level.

is_legacy

Boolean

Definition:

Whether the rule instance data is from version 1.0.

Value range:

  • true: The rule instance data is from version 1.0.

  • false: The rule instance data is not from version 1.0.

Example Requests

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

Example Responses

Status code: 200

Response body for querying policy details.

{
  "id" : "842cacd3424a470eb410300b537fa756",
  "name" : "New policy-20240625194201",
  "level" : "project",
  "version" : "efaddbfff5c742f781802004b888eccb",
  "is_valid" : true,
  "is_public" : false
}

Status Codes

Status Code

Description

200

Response body for querying policy details.

Error Codes

See Error Codes.