Retrieves a scan rule.
Operation description
Retrieves a scan rule.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
cri-xkx6vujuhay0**** |
| ScanRuleId |
string |
Yes |
The scan rule ID. |
crscnr-2sdveqjhpzdcafyq |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Code |
string |
The return code. |
success |
| IsSuccess |
boolean |
Indicates whether the API call is successful. Valid values:
|
true |
| RequestId |
string |
The request ID. |
C87993B5-7D61-5CAC-8D64-1AC732DD69FF |
| ScanRule |
object |
The scan rule. |
|
| InstanceId |
string |
The instance ID. |
cri-szw6f6bhrky0c8jk |
| ScanRuleId |
string |
The scan rule ID. |
crscnr-aemytkwad2h7fyhb |
| RuleName |
string |
The name of the event rule. |
protection |
| ScanScope |
string |
The scan scope. |
REPO |
| TriggerType |
string |
The trigger type. Valid values:
|
AUTO |
| Namespaces |
array |
The namespace names for which the event takes effect. |
|
|
string |
The namespace names for which the event takes effect. |
[\"lwc-app-group\"] |
|
| RepoNames |
array |
The repository names for which the event takes effect. |
|
|
string |
The repository names for which the event takes effect. |
[\"lesson-kit-api\",\"lesson-kit-consumer-gen\"] |
|
| RepoTagFilterPattern |
string |
The tag filtering rule that triggers the event. |
.* |
| CreateTime |
integer |
The creation time. |
2018-03-15T17:08Z |
| UpdateTime |
integer |
The update time. |
2025-08-28T20:07:33.164 |
| ScanType |
string |
The vulnerability type. Valid values:
|
SBOM |
Examples
Success response
JSON format
{
"Code": "success",
"IsSuccess": true,
"RequestId": "C87993B5-7D61-5CAC-8D64-1AC732DD69FF",
"ScanRule": {
"InstanceId": "cri-szw6f6bhrky0c8jk",
"ScanRuleId": "crscnr-aemytkwad2h7fyhb",
"RuleName": "protection",
"ScanScope": "REPO",
"TriggerType": "AUTO",
"Namespaces": [
"[\\\"lwc-app-group\\\"]"
],
"RepoNames": [
"[\\\"lesson-kit-api\\\",\\\"lesson-kit-consumer-gen\\\"]"
],
"RepoTagFilterPattern": ".*",
"CreateTime": 0,
"UpdateTime": 0,
"ScanType": "SBOM"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.