Searching Alert Rules

You can search alert rules using the following API.

Request URL

POST https://http-collector-observability.sixthsense.rakuten.com/api-externalization/api/v1/rules/search

Header

Header key - Authorization

Header value - Bearer {{access_token}} (Navigate to Settings > Access token > Show access token in the SixthSence portal.)

Request

{
"from": 0,
"keyword": "string",
"limit": 0,
"order": "ASC",
"serviceId": "string",
"sortBy": "lastUpdatedAt"
}

Example:

{
"keyword": "",
"limit": 10,
"from": 0,
"sortBy": "lastUpdatedAt",
"order": "ASC",
"serviceId": "eyduYW1lJzonQk0gQ2xpZW50IEFwcCcsJ3RlYW1JRCc6J2MyNjI4NmRiLTY3OTQtNGM0MS1hYjVmLThiNGFjOTU2NTU1MCcsJ3R5cGUnOidCJ30=.1"
}
ParametersDescription
keywordkeyword will be used to search rule name
limitnumber of records to be returned
fromstarting no. of record
sortBylastUpdatedAt
order
  • ASC : Ascending
  • DESC : Descending
  • serviceIdserviceId for which rules are required given by /api/v1/services/search

    Response

    {
    "data": {},
    "message": "string",
    "success": true
    }

    Example:

    {
    "message": "1 record(s) found",
    "success": true,
    "data": {
    "rules": [
    {
    "ruleId": "YTMwNDI2YWItMWU3MC00ODQyLTgwOTItZWY4YzI2YTg3YjMzXzE2NzQwMzkyODg3Njc=",
    "ruleName": "Error count for code 401 greater than 1 for more than or equal to a count of 1 in a period of 5 mins",
    "metricDisplayName": "Error code",
    "aggregationType": "SUM",
    "aggregationValue": 0,
    "period": 5,
    "thresholdDisplayValue": "1",
    "thresholdDisplayUnit": "na",
    "operation": "GT",
    "silencePeriod": 5,
    "recoveryPeriod": 0,
    "lastUpdatedAt": 1674035660974,
    "createdBy": "API user",
    "createdAt": 1674035660974,
    "modified": 1,
    "modifiedBy": "API user",
    "active": true,
    "serviceId": "eyduYW1lJzonbm9kZS1hcHAtMicsJ3RlYW1JRCc6JzU5ZWRkZDE1LTIwMjQtNDA1OS05OGFlLTc5YTJjZTViYTEzNCcsJ3R5cGUnOidBJ30=.1",
    "channels": [
    ""
    ],
    "filters": [
    {
    "key": "service_error_code",
    "value": "401"
    }
    ],
    "instances": [
    {
    "key": "endpoint",
    "value": "http://www.google.com"
    }
    ]
    }
    ],
    "total": 1
    }
    }