GetRuleGroupList
- Print
- PDF
GetRuleGroupList
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Summary
This API queries an event rule.
Request
API URL
URL: https://cw.apigw.ntruss.com/cw_fea/real/cw/api/rule/group/ruleGrp/query
Method: POST
Request header
The request headers specified in common settings are required.
x-ncp-apigw-signature-v2: {generated signature}
x-ncp-apigw-timestamp: {current timestamp}
x-ncp-iam-access-key: {your iam access key}
Request Body
Category | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
pageNum | Y | int | page number | |
pageSize | Y | int | page size | |
prodKey | Y | String | Product's cw_key | |
search | N | String | keyword |
Example
Request example
The code below shows an example of querying the event rules of all products. The query with pageSize of 3 and pageNum of 1 returns a total of 3 event rules.
POST /cw_fea/real/cw/api/rule/group/ruleGrp/query
Host: cw.apigw.ntruss.com
x-ncp-apigw-signature-v2: {generated signature}
x-ncp-apigw-timestamp: {current timestamp}
x-ncp-iam-access-key: {your iam access key}
Payload:
{
"prodKey": "*",
"pageSize": 3,
"pageNum": 1,
"search": ""
}
Response example
{
"pageNum": 0,
"pageSize": 0,
"ruleGroups": [
{
"cfTriggers": [],
"createTime": 1589775745332,
"domainCode": "PUB",
"groupName": "eventRule001",
"id": "eventRuleId001",
"metricsGroups": [
{
"createTime": 1589769312574,
"domainCode": "PUB",
"groupDesc": "The metric group (template) related to the server usage.",
"groupName": "Server usage",
"id": "metricGroupId001",
"metrics": [
{
"calculation": "AVG",
"condition": "GT",
"dimensions": [
{
"dim": "type",
"val": "svr"
}
],
"duration": 1,
"eventLevel": "INFO",
"metric": "avg_write_cnt",
"metricGroupItemId": "metricGroupItemId001",
"threshold": 0.7
},
{
"calculation": "AVG",
"condition": "GT",
"dimensions": [
{
"dim": "type",
"val": "svr"
}
],
"duration": 1,
"eventLevel": "INFO",
"metric": "avg_cpu_used_rto",
"metricGroupItemId": "metricGroupItemId002",
"threshold": 2
}
],
"prodKey": "xxxxxxxxxxxxxxxxxx",
"regionCode": "KR",
"temporaryGroup": false,
"updateTime": 1589770306595
}
],
"monitorGroups": [
{
"groupDesc": "Creates a monitor group.",
"groupName": "monitorGroup001",
"id": "monitorGroupId001",
"monitorGroupItemList": [
{
"nrn": "targetNRN001",
"resourceId": "targetId001"
}
],
"prodKey": "xxxxxxxxxxxxxxxxxx",
"temporaryGroup": false
}
],
"prodKey": "xxxxxxxxxxxxxxxxxx",
"productName": "System/Server",
"recipientNotifications": [
{
"groupName": "Recipient group",
"groupNum": xx,
"notifyTypes": [
"SMS",
"EMAIL"
]
}
],
"regionCode": "KR",
"ruleVersion": "V2",
"updateTime": 1589775745332
}
]
"totalPages": 2,
"totalRecords": 2
}
Was this article helpful?