Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
81 lines (64 sloc) 1.91 KB

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.eth.events/alerting/rules/ \
-H 'Authorization: Bearer <your-token>'

Get a single Alerting Rule

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

Add an Alerting Rule

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

Update an Alerting Rule

curl -X PUT \
https://api.eth.events/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.eth.events/alerting/rules/<id>/ \
-H 'Authorization: Bearer <your-token>'
You can’t perform that action at this time.