Warnings API
Returns a paginated list of unique warnings, ordered newest first.
GET
/api/warningsPublicOverview
This endpoint reads the warnings table, sorts rows by created_at (descending), deduplicates by id, then returns a page of results. Each item includes a display-ready date and time derived from the warning's onset/effective time, and the area.
No filters are supported. Use
limit and offset to paginate through all results.Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Page size. The server caps it at 100 max. (No minimum clamp is applied.) |
offset | integer | 0 | Number of items to skip (pagination). The server clamps this to 0 min. |
Response schema
{
"warnings": [
{
"id": "string",
"date": "DD.MM.YYYY", // derived from onset/effective time
"time": "HH:mm", // derived from onset/effective time
"area": "string"
}
],
"pagination": {
"total": number,
"limit": number,
"offset": number,
"hasMore": boolean
}
}Note: date and time are human-friendly strings produced on the server. If you need raw timestamps (e.g., ISO 8601 for onsetAt/expiresAt), consider extending the API in a future version.
Examples
curl "https://www.liukasbotti.fi/api/warnings?limit=50&offset=0"Behavior details
- Ordering by
created_at(newest first), then deduplication byidusing a server-side map. date/timecome from the warning's onset/effective time.areafalls back to an empty string if not present in the row.
Errors
| Status | Example body | When |
|---|---|---|
500 | | Unexpected server error. |
Bad inputs are coerced as follows:
limitis capped to 100 maxoffsetis clamped to 0 min- No other validation is performed.