Search documentation

Alerting API-Routes

When adding or modifying alerting rules via the API, you have to provide the metadata you can just select in the frontend. The actual configuration goes into the config section.

{
 "name":"Example Alerting Rule 0001",
 "maxConfirmationCount":10,
 "technology":"ethereum",
 "blockchain":"ethereum",
 "network":"kovan",
 "config":{
 "see":"examples"
 }
}

The available routes are:

Get all Alerting Rules

curl -X GET \
https://api.anyblock.tools/alerting/rules/ \
-H 'Authorization: Bearer <your-token>'

Get a single Alerting Rule


curl -X GET \
https://api.anyblock.tools/alerting/rules/<id>/ \
-H 'Authorization: Bearer <your-token>'

Add an Alerting Rule


curl -X POST \
https://api.anyblock.tools/alerting/rules/ \
-H 'Authorization: Bearer <your-token>' \
-H 'Content-Type: application/json' \
-d '{
        "name": "Example Alerting Rule 0001",
        "maxConfirmationCount": 10,
        "sendPendingAlerts": true,
        "technology": "ethereum",
        "blockchain": "ethereum",
        "network": "kovan",
        "config": {
            "see": "examples"
        }
    }'

Update an Alerting Rule


curl -X PUT \
https://api.anyblock.tools/alerting/rules/<id>/ \
-H 'Authorization: Bearer <your-token>' \
-H 'Content-Type: application/json' \
-d '{
        "name": "Example Alerting Rule 0002",
        "maxConfirmationCount": 5,
        "config": {
            "see": "examples"
        }
    }'

Delete an Alerting Rule


curl -X DELETE \
https://api.anyblock.tools/alerting/rules/<id>/ \
-H 'Authorization: Bearer <your-token>'

Interested or questions?

 

Sascha Göbel
(Co-Founder & Chief Technology Officer)
sascha@anyblockanalytics.com
+49 6131 3272372

    

Pin It on Pinterest