Get alert history

Retrieve alert history for an authenticated account

Description

This route lets you retrieve past alerts for an authenticated account based on various filter parameters. You can specify a set of metric alert IDs, a user ID, a subscription ID, and a time range to narrow the search. The response includes a paginated list of metric alerts matching the criteria, sorted from the most recent to the latest.

Endpoint

GET https://sentry.aleno.ai/alertHistory

Query parameters

Payload

No payload.

CURL example

curl -X GET \
  'https://sentry.aleno.ai/alertHistory' \
  -H 'Authorization: YOUR_API_KEY'

Result

Returns a list of Alert objects representing historical alerts received by the account. Alerts are sorted from the most recent to the latest one considering the sendTimestamp field.

{
    "data": [
        {
            "id": "ed002500-3caf-4082-bc8c-7eaf34c2eb65",
            "accountId": "528bf5c7-65d1-49fb-bb26-4bf273a215c5",
            "userId": "b59b60d1-6936-412e-8173-677775966b81",
            "userContext": null,
            "message": "🚨 Wrapped Ether (WETH) total TVL alert\n\n🔀 +1.15 % within the last 35 hours !\n\nℹ️  Details:\n    - current total TVL:          472.87  k WETH\n    - 13 minutes ago total TVL:   467.49  k WETH\n    - delta:                      +5.39  k WETH\n    - variation:                  +1.15 %\n    - block number:               19532191",
            "alertOutputs": {},
            "subscriptionId": "e6cfda18-6149-44cd-97e5-5961b4ee732c",
            "subscriptionThreshold": 0.00001,
            "metric": {
                "key": "token_total_tvl_0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                "info": {
                    "token": {
                        "name": "Wrapped Ether",
                        "symbol": "WETH",
                        "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                        "decimals": 18,
                        "isTracked": true
                    }
                },
                "name": "WETH total tvl",
                "type": "token_total_tvl"
            },
            "block": {
                "number": 19532191,
                "timestamp": 1711623839
            },
            "fromPoint": {
                "value": 467486.6555113975,
                "timestamp": 1711497600
            },
            "toPoint": {
                "value": 472873.9950330028,
                "timestamp": 1711623839
            },
            "metricDelta": 5387.339521605289,
            "metricPercentVariation": 1.1524049848464482,
            "createdAt": "2024-03-28T11:04:02.680Z",
            "updatedAt": "2024-03-28T11:04:02.680Z"
        },
        {
            "id": "a869e9ac-f4ad-4b27-9a42-250a8ce2c834",
            "accountId": "528bf5c7-65d1-49fb-bb26-4bf273a215c5",
            "userId": "b59b60d1-6936-412e-8173-677775966b81",
            "userContext": null,
            "message": "🚨 Wrapped Ether (WETH) total supply alert\n\n🔀 +0.227 % within the last 35 hours !\n\nℹ️  Details:\n    - current total supply:          2.98  M WETH\n    - 13 minutes ago total supply:   2.98  M WETH\n    - delta:                         +6.77  k WETH\n    - variation:                     +0.227 %\n    - block number:                  19532191",
            "alertOutputs": {},
            "subscriptionId": "9e8140f4-2880-4c08-bf23-7e4e35676138",
            "subscriptionThreshold": 0.00001,
            "metric": {
                "key": "token_total_supply_0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                "info": {
                    "token": {
                        "name": "Wrapped Ether",
                        "symbol": "WETH",
                        "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                        "decimals": 18,
                        "isTracked": true
                    }
                },
                "name": "WETH total supply",
                "type": "token_total_supply"
            },
            "block": {
                "number": 19532191,
                "timestamp": 1711623839
            },
            "fromPoint": {
                "value": 2976765.9390402273,
                "timestamp": 1711497600
            },
            "toPoint": {
                "value": 2983533.8406886477,
                "timestamp": 1711623839
            },
            "metricDelta": 6767.901648420375,
            "metricPercentVariation": 0.22735753455316982,
            "createdAt": "2024-03-28T11:04:02.680Z",
            "updatedAt": "2024-03-28T11:04:02.680Z"
        },
   
            "metricDelta": -12.775696888774064,
            "metricPercentVariation": -1.176846619562466,
            "createdAt": "2024-03-28T11:03:51.385Z",
            "updatedAt": "2024-03-28T11:03:51.385Z"
        },
        ...
    ]
}

Last updated