Get alert history
GET https://datafa.st/api/v1/admin/websites/{websiteId}/alerts/history
Get recent alert trigger logs. Supports alertId and limit query parameters.
Request
Authentication
dft_account token withalerts:read.
Path parameters
| Parameter | Type | Description |
|---|---|---|
websiteId | string | Website ObjectId used by account tokens to choose which website to query or manage. Website ObjectId. The caller token must have access to this website. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
alertId | string | No | Filter history to one alert ObjectId. |
limit | number | No | Maximum number of rows returned in one response. Use with offset to paginate through long result sets. Maximum logs returned. Defaults to 50, capped at 100. |
Response
Returns a JSON object with
status and endpoint-specific fields.Response fields
| Field | Type | Description |
|---|---|---|
data[].alertId | string | Alert ObjectId. |
data[].alertName | string | Alert name. |
data[].goalName | string | Goal that triggered the alert. |
data[].status | string | sent or failed status. |
data[].error | string | null |
data[].visitorId | string | null |
data[].triggeredAt | string | Trigger timestamp. |
counts.sent | number | Number of sent logs before limit slicing. |
counts.failed | number | Number of failed logs before limit slicing. |
counts.total | number | Total logs before limit slicing. |
Errors
Common errors include
400 for invalid input, 401 for missing or invalid tokens, 403 for missing permissions or website access, 404 for missing resources, and 500 for server errors.