Help Center> CodeArts Pipeline> API Reference> API> Project-level policy management> Querying Details About a Project-Level Policy
Updated on 2023-11-28 GMT+08:00

Querying Details About a Project-Level Policy

Function

Querying Details About a Project-Level Policy

URI

GET /v2/{project_id}/rule-sets/{rule_set_id}/gray/detail

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

rule_set_id

Yes

String

Policy ID.

project_id

Yes

String

Project ID

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

id

String

Rule Template Instance ID

name

String

Rule Template Instance Name

type

String

Type

version

String

Version

creator

String

Created By

create_time

String

Created

updater

String

User who performs the last update.

update_time

String

Last update time.

is_valid

Boolean

Effective

rule_instances

Array of RuleInstance objects

Rule Instance Set

Table 3 RuleInstance

Parameter

Type

Description

id

String

Rule Instance ID

type

String

Rule Type ID

name

String

Rule Name

version

String

Rule version.

plugin_id

String

Plug-in ID

plugin_name

String

Plug-in

plugin_version

String

Add-on version.

is_valid

Boolean

Effective

editable

Boolean

Whether the pipeline is editable

content

Array of RuleInstanceContent objects

Rule Attribute List

parent

RuleSet object

Brief information about the parent rule instance template

Table 4 RuleInstanceContent

Parameter

Type

Description

group_name

String

Group Name

type

String

Group type

can_modify_when_inherit

Boolean

Can the Threshold of an Inherited Subpolicy Be Modified?

properties

Array of RuleInstanceProperty objects

Rule Attribute List

Table 5 RuleInstanceProperty

Parameter

Type

Description

key

String

Attribute Key

type

String

Type

name

String

Display name

operator

String

Comparison Operators

value

String

Property value.

value_type

String

Data Type

Table 6 RuleSet

Parameter

Type

Description

id

String

Rule Template Instance ID

name

String

Rule Template Instance Name

type

String

Type

version

String

Version

operator

String

Latest Operator

operate_time

Long

Last Operation Time

is_valid

Boolean

Effective

level

String

Tenant-level and project-level

is_public

Boolean

System Level

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Error Message

error_code

String

Error code.

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 403

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 404

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Example Requests

https://{endpoint}/v2/d80a8a6530324b7bac972cbb8a9f28ec/rule-sets/f9228e23118c4fa5a9c86493ea0cffc2/gray/detail

Example Responses

Status code: 200

OK

{
  "id" : "f9228e23118c4fa5a9c86493ea0cffc2",
  "name" : "System-Defined Policies",
  "version" : "ace33a17a73442e398fedc123d047da2",
  "is_valid" : true,
  "creator" : "system",
  "create_time" : "2022-11-14T16:12:12",
  "updater" : "system",
  "update_time" : "2023-03-13T20:40:56",
  "rule_instances" : [ {
    "id" : "ee207826d1773f9122857474af314e48",
    "type" : "Gate",
    "name" : "API test pass rate access control",
    "is_valid" : false,
    "version" : "90cd646fa8cd7f91d38e592dbb76a62e",
    "plugin_id" : "official_devcloud_apiTest",
    "plugin_name" : "official_devcloud_apiTest",
    "plugin_version" : "0.0.1",
    "content" : [ {
      "group_name" : "API test pass rate access control",
      "can_modify_when_inherit" : true,
      "properties" : [ {
        "key" : "apitest",
        "type" : "judge",
        "name" : "API test pass rate",
        "value_type" : "float",
        "value" : "1.0",
        "operator" : ">="
      } ]
    } ]
  } ]
}

Status Codes

Status Code

Description

200

OK

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.