Skip to content

Get Alert Metadata

Return a list (or a subset) of Alert Metadata that the user has access to.

Both the raised-at and cleared-at ranges may be searched up to seven days at a time, and a range with only one bound supplied has the other filled in using the same seven days: see DateTime Handling.

Send no dates and you get the last seven days. A request with no dates returns metadata for alerts raised in the last seven days, which is what you already get when you send only one of the two dates. To cover a different period, send raisedAtStart and raisedAtEnd.

A full page of 10,000 metadata entries is roughly 4.3 MB of JSON at worst, so size your buffers and client timeouts accordingly. Entry values vary enormously in length, so a typical page is far smaller than that.

Note

total-pages is counted separately from the page it arrives with, so on a busy result set it can be a fraction of a second out of step with the rows beside it. New alerts arrive continuously, so it moves between requests regardless. Treat it as the size of the result set a moment ago rather than an exact count of what you are holding.

Verb POST
Endpoint {base-url}/alerts/metadata
Max Page Size 10000

Request Body

{
  "routeFilter": {
    "alertIds": [3609],
    "alertMetadataIds": [6],
    "alertCodes": ["NS"],
    "raisedAtStart": "2024-03-15T00:00:00Z",
    "raisedAtEnd": "2024-03-22T00:00:00Z",
    "clearedAtStart": "2024-03-15T00:00:00Z",
    "clearedAtEnd": "2024-03-22T00:00:00Z"
  },
  "requestFilter": {
    "organizationIds": [1]
  }
}

Filters Honored

  • RequestFilter
    • organizationIds
  • AlertFilter
    • alertIds
    • alertMetadataIds
    • alertCodes
    • raisedAtStart
    • raisedAtEnd
    • clearedAtStart
    • clearedAtEnd

Returns

On Success

The requested set of alert metadatas.

Response Body

[
  {
    "id": 6,
    "alertId": 3609,
    "key": "foo",
    "value": "bar"
  }
]