Obtaining Details About a Single Rule
Function
This API is used to query details about a single rule.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{domain_id}/rules/{rule_id}/detail
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
domain_id |
Yes |
String |
Tenant ID. |
rule_id |
Yes |
String |
Rule ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
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 |
Extension ID. |
plugin_name |
String |
Extension name. |
plugin_version |
String |
Extension version. |
creator |
String |
Creator. |
create_time |
String |
Creation time. |
updater |
String |
Updater. |
update_time |
String |
Update time. |
content |
Array of RuleContent objects |
Rule attribute list. |
Parameter |
Type |
Description |
---|---|---|
group_name |
String |
Group name. |
can_modify_when_inherit |
Boolean |
Whether thresholds of an inherited policy can be modified. |
properties |
Array of RuleProperty objects |
Rule attribute list. |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Attribute key. |
type |
String |
Type. |
name |
String |
Display name. |
operator |
String |
Comparison operators. |
value |
String |
Attribute value. |
value_type |
String |
Data type. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error 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 |
Request failed. |
401 |
Authentication failed. |
403 |
No permission. |
404 |
Resource not found. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot