Fetch supported metric templates for alert creation

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Returns supported metric templates with pattern and parameter metadata.

Request URL

https://{serverurl}/intelligence/api/alerts/getRuleDetails

Scope

DesktopCentralCloud.DEX.READCopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

AcceptstringMandatory
application/alertRuleDetails.v1+jsonapplication/alertRuleDetails.v1+jsonCopied!

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request GET \
  --url https://appdomains/intelligence/api/alerts/getRuleDetails \
  --header 'Accept: application/alertRuleDetails.v1+json' \
  --header 'Authorization: Zoho-oauthtoken  d92d4xxxxxxxxxxxxx15f52'

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Array
Hide Sub-Attributes
JSON Object
Show Sub-Attributes
metricKeystring

Metric key identifying this rule template

ruleNamestring

Localized rule display name

ruleStatusboolean

Rule status flag

rulePatternstring

Localized display pattern for rendering UI conditions

ruleParamsJSON Object

Parameter metadata map keyed by index

Show Sub-Attributes
numericforidsJSON Object

Rule parameter metadata object keyed by index

Show Sub-Attributes
ruleParamTemplateIdstring

Rule parameter template identifier

ruleUnitstring

Current display unit for this parameter

paramValuestring

Current/default value for this parameter

displayUnitCategorystring

Unit category used for conversion and validation

minimumValuelong

Minimum allowed value after unit conversion

maximumValuelong

Maximum allowed value after unit conversion

unitOptionsarray

Allowed display units for the parameter

- HTTP code 500

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodestring

Internal server error code for get rule details operation

errorMessagestring

Internal server error message for get rule details operation

Possible Response Codes

200HTTP code
500HTTP code

Sample Response: HTTP 200

Supported metric templates for alert rule configuration

Copied!
  [
    {
      "metricKey": "301",
      "ruleName": "CPU Usage",
      "rulePattern": "CPU usage above {0} for {1}",
      "ruleStatus": true,
      "ruleParams": {
        "0": {
          "minimumValue": 1,
          "ruleUnit": "%",
          "ruleParamTemplateId": "7001",
          "unitOptions": [
            "%"
          ],
          "maximumValue": 100,
          "paramValue": "90",
          "displayUnitCategory": "percentage"
        },
        "1": {
          "minimumValue": 1,
          "ruleUnit": "minutes",
          "ruleParamTemplateId": "7002",
          "unitOptions": [
            "seconds",
            "minutes"
          ],
          "maximumValue": 1440,
          "paramValue": "10",
          "displayUnitCategory": "time"
        }
      }
    }
  ]
                
Show full

Sample Response: HTTP 500

Unexpected failure while fetching rule templates

Copied!
  {
    "errorMessage": "Unable to fetch rule details due to internal error",
    "errorCode": "INTERNAL_ERROR"
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.