Coralogix provides an activation/deactivation rules API for its Rules engine. This allows you to control your rules and trigger their activation remotely based on triggers such as alerts and usage warnings.
To activate the API, All requests must include the authorization header, same as the alerts API.
In your Admin account: Go to Data Flow -> API Keys -> API Access
GET https://api.coralogix.com/api/v1/rules
POST https://api.coralogix.com/api/v1/rules/toggle
{
"ruleName": "My rule",
"active": true
}
POST https://api.coralogix.com/api/v1/rules/toggle
{
"ruleName": "My rule",
"active": false
}
The rules API responses with the following response codes:
200 – Success
400 – ‘Rule not found’
400 – ‘You have more than one rule with the same name, please change the rule name’
500 – Rule toggle failure (Internal error)