---
title: "Returns a list of alerts for the requested chains, sources and severities between a time period sorted by most recent. A number limit of alerts can also be specified."
method: POST
path: "/server/mongo/alerts"
tags: ["Mongo"]
---

# Returns a list of alerts for the requested chains, sources and severities between a time period sorted by most recent. A number limit of alerts can also be specified.

`POST /server/mongo/alerts`

## Request body

- MongoAlerts
  - `chains` object[]
  - `severities` object[]
  - `sources` object[]
  - `minTimestamp` integer
  - `maxTimestamp` integer
  - `noOfAlerts` integer

## Response `200`

OK

- MongoAlertsResult
  - `result` object
    - `alerts` Alert[]
      - `origin` string
      - `alert_name` string
      - `severity` string
      - `message` string
      - `metric` string
      - `timestamp` integer

## Other responses

- `532` — Error: Missing key(s) in request body.
- `535` — Error: Mongo client not initialised.
- `536` — Error: Could not retrieve data from Mongo.
- `539` — Error: An invalid value was given to the parameter.

## Changes

- **2022-03-30** `b115d1f2939d` — 1 info
  - added the media type `application/json` for the response with the status `200`
- **2021-07-09** `7abd9c7d6948` — 1 breaking
  - removed the media type `application/json` for the response with the status `200`

[Change history](https://skmtc.dev/simplystaking/apis/panic-api/changes/server/mongo/alerts/post.md)

---

[API](https://skmtc.dev/simplystaking/apis/panic-api.md) · [All operations](https://skmtc.dev/simplystaking/apis/panic-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/simplystaking/panic-api/revisions/4400907a393c/schema)
