TUTORIALS

Rules API

coralogix parsing rules

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 settings -> Account settings -> API Access

Coralogix API access key

Get all rules

GET https://api.coralogix.com/api/v1/rules

Activate rule

POST https://api.coralogix.com/api/v1/rules/toggle

{
    "ruleName": "My rule",
    "active": true
}

Deactivate rule

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 then one rule with the same name, please change the rule name’
500 – Rule toggle failure (Internal error)

Let's talk about how Coralogix can help you better understand your logs