Help Center/ CodeArts Pipeline/ API Reference/ API/ Rule Management/ Obtaining Details About a Single Rule

Obtaining Details About a Single Rule

Updated on 2023-11-28 GMT+08:00

Function

Obtaining Details About a Single Rule

URI

GET /v2/{domain_id}/rules/{rule_id}/detail

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

domain_id

Yes

String

Indicates the tenant ID.

rule_id

Yes

String

Rule ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. Can be obtained by calling the IAM API for obtaining the user token (the value of X-Subject-Token in the response header).

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

String

Rule ID.

type

String

Rule type

name

String

Rule Name

version

String

Rule version.

layout_content

String

Layout Content

plugin_id

String

Plug-in ID

plugin_name

String

Plug-in

plugin_version

String

Add-on version.

creator

String

Created By

create_time

String

Created

updater

String

User who updated the data

update_time

String

Updated

content

Array of RuleContent objects

Rule Attribute List

Table 4 RuleContent

Parameter

Type

Description

group_name

String

Group

can_modify_when_inherit

Boolean

Can the Threshold of an Inherited Subpolicy Be Modified?

properties

Array of RuleProperty objects

Rule Attribute List

Table 5 RuleProperty

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

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Example Requests

GET https://{endpoint}/v2/ce8df55870164338a72d7e828a966a2a/rules/865b4c2d616b46ab890fff056a6f7e05/detail

Example Responses

Status code: 200

Request succeeded.

{
  "id" : "865b4c2d616b46ab890fff056a6f7e05",
  "type" : "Build",
  "name" : "New Rule-20231020103003",
  "version" : "e2db2a63b3064252874b1b5a8571e2be",
  "plugin_id" : "official_devcloud_cloudBuild",
  "plugin_name" : "official_devcloud_cloudBuild",
  "plugin_version" : "0.0.15",
  "content" : [ {
    "group_name" : "MavenUnitTest",
    "can_modify_when_inherit" : true,
    "properties" : [ {
      "key" : "build.PassRatio",
      "type" : "judge",
      "name" : "PassRatio",
      "value_type" : "float",
      "value" : "0.1",
      "operator" : "="
    }, {
      "key" : "build.TotalCases",
      "type" : "judge",
      "name" : "TotalCases",
      "value_type" : "float",
      "value" : "0.1",
      "operator" : "="
    }, {
      "key" : "build.CoverageRatio",
      "type" : "judge",
      "name" : "CoverageRatio",
      "value_type" : "float",
      "value" : "0.1",
      "operator" : "="
    } ]
  } ],
  "creator" : "847a5317086c41798469d0868535943a",
  "create_time" : "2023-10-20T10:30:20",
  "updater" : "847a5317086c41798469d0868535943a",
  "update_time" : "2023-10-20T10:30:20"
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Failed request

401

Authentication failed.

403

No permission.

404

The resource does not exist.

Error Codes

See Error Codes.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback