GET /portfolio/monitoring/alerts

You can get a list of all Internet Routing Alerts and Internet Performance Alerts. Each Internet Alert has its own output content. See Alerts Output for information on the output for the various Internet Alert types. See Alert Categories and Types for a listing of available alert categories.

NOTE: Alerts will be deleted 180 days after they were raised.

URI: https://dii.dynapis.com/portfolio/monitoring/alerts

Request Parameters:

  • fields – List of fields to include in the search of your alerts. You can specify multiple fields either in a comma-separated list, or with multiple occurrences of parameter: fields=a,b,c is equivalent to fields=a&fields=b&fields=c or fields=a,b&fields=c
    • alarmId – The specific ID number given to an alert.
    • type – Type of asset being monitored.
    • asset.assetName – Name of asset.
    • asset.assetType – The type of asset.
    • asset.inventories – Inventories the asset resides in.
  • limit – Retrieve no more than a specified number of alerts, up to 1000 alerts.
  • alarmId – Request a specific alert via its alarmId.
  • type – Request the alerts by a specific type. Learn more about alert category and types.
  • category – Request the alerts by a specific category. Learn more about alert category and types.
  • firstEvidenceAt – Request alerts whose first evidence was seen at the specified time (POSIX timestamp).
  • raisedAt – Request alerts that were raised at a specified time (POSIX timestamp).
  • loweredAt – Get alerts lowered at a specific time (POSIX timestamp).
  • acknowledgedAt – Get alerts that were acknowledged at a specific time (POSIX timestamp).
  • acknowledgeType – Get alerts that were acknowledged by a specified means. Valid acknowledgement types: user, suppress.
  • asset – Get alerts for a specified asset within your Portfolio.
  • prefix – Get alerts for a specified IP prefix.
  • origin – Get alerts for a specified ASN.
  • ip – Get alerts for a specified IP address.
  • cloudzone – Get alerts for a specified cloudzone.
  • cdn – Get alerts for a specified CDN.

Sample URI that searches for alerts of a specific type from a specific user ID and asset: https://dii.dynapis.com/portfolio/monitoring/alerts?type=latency-fixed&ip=54.43.32.21

Request Body:

  • None



NOTE: If you do not include the limit request parameter, this response will be truncated to the first 1000 matching alerts. Truncated responses are accompanied by a “303 See Other” status code. The response includes a Link header (defined by RFC 5988) that lets you retrieve the next batch of 1000 matching alerts. If you want to retrieve all matching alerts, you will need to page through them by following successive the Link headers.

Example Request Using “next” Link:
Example of a truncated response:

GET /portfolio/monitoring/alerts?fields=alarmId HTTP/1.1

HTTP/1.1 303 See Other
Content-Type: application/json
Link: <?fields=alarmId&alarmId.lt=23676227>; rel="next"
Location: ?fields=alarmId&alarmId.lte=28639336&limit=1000

[...JSON array of the first 1000 matching alarms...]

To retrieve the next page of results, look for the Link header with rel="next". Extract the relative URI reference from inside the angle brackets (“<>“). Resolve it according to RFC 3986 section 5, using the retrieval URI (“/monitoring/alerts?fields=alarmId”) as the base URI. The request to retrieve the next page will then look like:

GET /portfolio/monitoring/alerts?fields=alarmId&alarmId.lt=23676227

HTTP/1.1 303 See Other
Content-Type: application/json
Link: <?fields=alarmId&alarmId.lt=19937864>; rel="next"
Location: ?fields=alarmId&alarmId.lte=23676223&limit=1000

[...JSON array of the next 1000 matching alerts...]

When you reach the last page of results, you will receive a “200 OK” response with no Link header:

GET /portfolio/monitoring/alerts?fields=alarmId&alarmId.lt=1056246 HTTP/1.1

HTTP/1.1 200 OK
Content-Type: application/json

[...JSON array of < 1000 remaining alerts...]



Example Response (JSON):
See Alerts Output for information on the output for each type of alert.

Example of an outage alert response:

[
  {
    "acknowledgeType":"archived",
    "loweredAt":1411023217,
    "peerCount":210,
    "firstEvidenceAt":1410756954,
    "prefix":"23.53.192.0/20",
    "updatedAt":1435764223,
    "acknowledgedAt":1435764223,
    "category":"outage",
    "raisedAt":1410776838,
    "alarmId":85688,
    "asset":"23.53.192.0/20",
    "type":"outage",
    "userName":"example@sample.com",
    "typeName":"outage"
  }
]