API Requests
VERB | RESOURCE | PARAMETERS (TYPE) | DESCRIPTION |
GET | /portfolio/monitoring/alerts (all alerts) |
|
Retrieve a list of alerts using specified parameters. |
GET | /portfolio/monitoring/alerts (since given time) |
|
Retrieve a list of all alerts since a given time. |
GET | /portfolio/monitoring/alerts (unacknowledged alerts) |
|
Retrieve a list of all unacknowledged alerts. |
GET | /portfolio/monitoring/alerts (all alerts, one asset) |
|
Retrieve all alerts for one asset. |
GET | /portfolio/monitoring/types | None | Retrieves a list of alert types. |
GET | /portfolio/monitoring/alerts/{alert id} | None | Retrieves the details for the alert identified. |
POST | /portfolio/monitoring/bulkAcknowledge (all) | None | Acknowledge all alerts. |
POST | /portfolio/monitoring/bulkAcknowledge (one asset) | None | Acknowledge alerts for one asset. |
POST | /portfolio/monitoring/bulkAcknowledge (one type) | None | Acknowledge all alerts of one type. |
POST | /portfolio/monitoring/bulkAcknowledge (one type, one asset) | None | Acknowledge one type of alert for one asset. |
PUT | /portfolio/inventories/{id} (suppress alert) |
|
Enable or disable alerts for an inventory. |
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.
URI: https://dii.dynapis.com/portfolio/monitoring/alerts
Legacy URI: https://api.renesys.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 tofields=a&fields=b&fields=c
orfields=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 itsalarmId
.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
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...] </pre> <p>To retrieve the next page of results, look for the <code>Link</code> header with <code>rel="next"</code>. Extract the relative URI reference from inside the angle brackets ("<>"). Resolve it according to <a href="https://tools.ietf.org/html/rfc3986#section-5">RFC 3986 section 5</a>, using the retrieval URI ("/monitoring/alerts?fields=alarmId") as the base URI. The request to retrieve the next page will then look like:</p> <pre class="prettyprint"> 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...] </pre> <p>When you reach the last page of results, you will receive a "200 OK" response with no <code>Link</code> header:</p> <pre class="prettyprint"> 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...] </pre> <p><br></br><br ?--> <strong>Example Response (JSON): </strong> See <a href="https://help.dyn.com/alerts-output-by-type/">Alerts Output</a> 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" } ]
GET /portfolio/monitoring/alerts (alerts since given time)
Use this command to retrieve all alerts from the Unix timestamp entered. This is the same information received from the Get All Alerts command except, in this command, you request the most recent alerts.
URI:
https://dii.dynapis.com/portfolio/monitoring/alerts/alerts?raisedAt.gt={unix timestamp}
Legacy URI: https://api.renesys.com/portfolio/monitoring/alerts/alerts?raisedAt.gt={unix timestamp}
Where {unix timestamp} is replaced with the Unix timestamp for the time and date of the earliest alert you want to receive.
Request Body Fields (JSON):
- None
Example Response (JSON):
Here is an example response for raisedAt.gt=1463672279
{ "origin": 10794, "acknowledgeType": null, "loweredAt": null, "peerCount": 373, "firstEvidenceAt": 1468933449, "prefix": "171.128.0.0/10", "updatedAt": 1468933864, "acknowledgedAt": null, "category": "unexpected-activity", "raisedAt": 1468933449, "validOrigins": [], "alarmId": 13796613, "asset": "171.128.0.0/10", "type": "unexpected-subprefix-activity", "subprefix": "171.161.53.0/24", "userName": "example@sample.com", "typeName": "unexpected-subprefix-activity", "previousOrigin": null }
GET /portfolio/monitoring/alerts (unacknowledged)
You can get a list of all unacknowledged alerts, both from Internet Routing Alerts and Internet Performance Alerts. Each alert’s output format is basically the same, but the output fields vary by the alert type. See Alerts Output for information on the output fields for the various alert types.
URI:
Retrieve all unacknowledged Monitoring alerts:
https://dii.dynapis.com/portfolio/monitoring/alerts?acknowledgedAt.is_null=
Legacy URI: https://api.renesys.com/portfolio/monitoring/alerts?acknowledgedAt.is_null=
Retrieve all unacknowledged Performance alerts:
https://dii.dynapis.com/portfolio/monitoring/alerts?acknowledgedAt.is_null=&category=performance
Legacy URI: https://api.renesys.com/
Request Body Fields (JSON):
- None
Example Response (JSON)
See Alerts Output for information on the output for each type of alert.
Here is an example of an unacknowledged alert of unexpected subprefix activity:
{ "origin": 10794, "acknowledgeType": null, "loweredAt": null, "peerCount": 373, "firstEvidenceAt": 1468933449, "prefix": "171.128.0.0/10", "updatedAt": 1468933864, "acknowledgedAt": null, "category": "unexpected-activity", "raisedAt": 1468933449, "validOrigins": [], "alarmId": 13796613, "asset": "171.128.0.0/10", "type": "unexpected-subprefix-activity", "subprefix": "171.161.53.0/24", "userName": "example@email.com", "typeName": "unexpected-subprefix-activity", "previousOrigin": null },
GET /portfolio/monitoring/alerts (for a specific asset)
You can get a list of all monitoring alerts for a single asset. Each alert has its own output content. See Alerts Output for information on the output for each type of alert.
URI: https://dii.dynapis.com/portfolio/monitoring/alerts?asset={asset}
Legacy URI: https://api.renesys.com/portfolio/monitoring/alerts?asset={asset}
Example request to retrieve alerts for a specific IP prefix:
https://dii.dynapis.com/portfolio/monitoring/alerts?asset=84.205.69.0/24
Example request to retrieve alerts for a specific ASN:
https://dii.dynapis.com/portfolio/monitoring/alerts?asset=12654
Request Body Fields (JSON):
- None
Example Response (JSON):
Here is an example of retrieving alerts for the prefix asset: 171.181.112.0/24
{ "origin": 19886, "acknowledgeType": "archived", "loweredAt": 1432318734, "peerCount": 0, "firstEvidenceAt": 1432247096, "prefix": "171.181.112.0/24", "updatedAt": 1435764223, "acknowledgedAt": 1435764223, "category": "unexpected-activity", "raisedAt": 1432247096, "validOrigins": [], "alarmId": 769458, "asset": "171.181.112.0/24", "type": "unexpected-prefix-activity", "userName": "example@sample.com", "typeName": "unexpected-prefix-activity", "previousOrigin": null }
GET /portfolio/monitoring/types
Retrieves a list of alert types. See Alerts Output by Type for more information on the information contained in each alert.
URI: https://dii.dynapis.com/portfolio/monitoring/types
Legacy URI: https://api.renesys.com/portfolio/monitoring/types
Request Body Fields (JSON):
- None
Example Response (JSON):
[ "hijack", "outage", "instability", "leak", "unexpected-activity", "upstream", "performance", "cloudzone", "cdn" ]
GET /portfolio/monitoring/alerts/{alarmid} (details by alert ID)
Retrieves the details for the identified alert. When you receive a Routing or Performance Alert notification email, you can use the Alert’s Alarm ID (inside the email) to retrieve the details about the alert through the API, including information on when the issue was first seen, the time the alert was raised, and the current monitoring threshold that was crossed. This information can be used to better understand the context around the alert notification. See Alerts Output for information on the output for the various Internet Alert types.
URI https://dii.dynapis.com/portfolio/monitoring/alerts/{alarmid}
Legacy URI: https://api.renesys.com/portfolio/monitoring/alerts/{alarmid}
Request Body Fields (JSON):
- None
Example Response (JSON):
See Alerts Output for information on the output for each type of alert.
{ "acknowledgeType": null, "loweredAt": 1480514730, "peerCount": 46, "firstEvidenceAt": 1480514470, "prefix": "84.205.64.0/24", "updatedAt": 1480514764, "acknowledgedAt": null, "category": "instability", "raisedAt": 1480514460, "alarmId": 24631168, "asset": "84.205.64.0/24", "type": "instability", "userName": "7a002f3b-16d1-4e3b-aff6-b078beb14f9c", "typeName": "instability" }
POST /portfolio/monitoring/bulkAcknowledge (all)
Acknowledge all alerts. Alerts remain active until acknowledged. You can all acknowledge alerts at once using this command. See Alert Categories and Types for a listing of available alert categories.
URI https://dii.dynapis.com/portfolio/monitoring/bulkAcknowledge
Legacy URI: https://api.renesys.com/portfolio/monitoring/bulkAcknowledge
Request Body Fields (JSON):
- None
Example Response:
HTTP/1.1 204 No Content
POST /portfolio/monitoring/bulkAcknowledge (one asset)
Acknowledge an alert from one asset. Alerts remain active until acknowledged. See Alert Categories and Types for a listing of available alert categories.
URI: https://dii.dynapis.com/portfolio/monitoring/bulkAcknowledge?asset={asset}
Legacy URI: https://api.renesys.com/portfolio/monitoring/bulkAcknowledge?asset={asset}
Example for acknowledging alerts for an ASN:
https://dii.dynapis.com/portfolio/monitoring/bulkAcknowledge?asset=12654
Request Body Fields (JSON):
- None
Example Response:
HTTP/1.1 204 No Content
POST /portfolio/monitoring/bulkAcknowledge (one type)
Acknowledge all alerts of one type. Alerts remain active until acknowledged. See Alert Categories and Types for a listing of available alert categories.
URI: https://dii.dynapis.com/portfolio/monitoring/bulkAcknowledge?typeName={alarm type}
Legacy URI: https://api.renesys.com/portfolio/monitoring/bulkAcknowledge?typeName={alarm type}
Example URI acknowledging one type of alert (outage):
https://dii.dynapis.com/portfolio/monitoring/bulkAcknowledge?typeName=outage
Response Body Fields (JSON):
- None
Example Response:
HTTP/1.1 204 No Content
POST /portfolio/monitoring/bulkAcknowledge (one type, one asset)
Acknowledge one type of alert for one asset. Alerts remain active until acknowledged. See Alert Categories and Types for a listing of available alert categories.
URI: https://dii.dynapis.com/portfolio/monitoring/bulkAcknowledge?{asset type}={prefix}&typeName={alert type}
Legacy URI: https://api.renesys.com/portfolio/monitoring/bulkAcknowledge?{asset type}={prefix}&typeName={alert type}
Example URI acknowledging outage on a specific IP prefix:
https://dii.dynapis.com/portfolio/monitoring/bulkAcknowledge?prefix=84.205.64.0/24&typeName=outage
Example URI acknowledging instability on a specific IP prefix:
https://dii.dynapis.com/portfolio/monitoring/bulkAcknowledge?asn=84.205.64.0/24&typeName=instability
Response Body Fields (JSON):
- None
Example Response:
HTTP/1.1 204 No Content
PUT /portfolio/inventories/{inventory} (enable or disable alerts)
Enable or disable alerts for an inventory. Updating the contents of an inventory is the same request for Internet Routing Alerts and Internet Performance Alerts APIs.
URI: https://dii.dynapis.com/portfolio/{inventory}
Legacy URI: https://api.renesys.com/portfolio/{inventory}
A sample URI for an inventory named “example inventory”: https://dii.dynapis.com/portfolio/example%20inventory
Example Request (JSON):
Must be a JSON object.
{"monitoring": true, "comment": "This is your comment"}
Request Body Fields (JSON):
- monitoring – Enable alerts for this asset. Values can be either
true
orfalse
. - comment – User supplied description of the asset.
Example Response:
HTTP/1.1 204 No Content