# router alerts — NCM API

Alerts the device itself raised for notable events, such as a WAN status change or an Ethernet WAN connecting. Read-only, a single list call. These originate on the router; for alerts NCM raises against thresholds you configured, see alerts and alert rules.

Base URL: https://www.cradlepointecm.com/api/v2

### GET /router_alerts/

Get information about router_alerts

<p>Use the GET method on this endpoint to retrieve router_alerts records. Use the available filtering fields to narrow or broaden your search.</p><p><strong>Note: </strong>There is a 100 device limit for API queries. If you attempt to retrieve records for more than 100 devices in a single query you will receive an error message. If you do not explicitly specify devices, it is assumed that you are trying to pull records for all devices in your account. If you have more than 100 devices in your account then you may query in batches. See the example titled 'Net Device Usage and Signal Samples' on the Sample Code page for details on querying in batches.</p>

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| X-ECM-API-ID | header | string | yes | <strong>ECM API app Id</strong> |
| X-ECM-API-KEY | header | string | yes | <strong>ECM API app key</strong> |
| X-CP-API-ID | header | string | yes | <strong>Cradlepoint API app Id</strong> |
| X-CP-API-KEY | header | string | yes | <strong>Cradlepoint API access key</strong> |
| router | query | in: int<br />out: url | no | Router ID |
| router__in | query | in: int<br />out: url | no | Filter for router ID contains - a comma-separated list of router-record IDs |
| created_at | query | timestamp | no | Timestamp for when the router_alerts record was created |
| created_at__lt | query | timestamp | no | Less than filtering operator for created_at |
| created_at__gt | query | timestamp | no | Filter for created_at is greater than |
| created_at_timeuuid | query | timeuuid | no | A unique ID (timeuuid) associated with the created_at timestamp |
| created_at_timeuuid__in | query | timeuuid | no | Filter for created_at_timeuuid in - a comma-separated list of timeuuids for router_alerts records |
| created_at_timeuuid__gt | query | timeuuid | no | Filter for created_at_timeuuid is greater than |
| created_at_timeuuid__gte | query | timeuuid | no | Filter for created_at_timeuuid is greater than or equal to |
| created_at_timeuuid__lt | query | timeuuid | no | Filter for created_at_timeuuid is less than |
| created_at_timeuuid__lte | query | timeuuid | no | Filter for created_at_timeuuid is less than or equal |
| order_by | query | string | no | Specifies the sort order for response data |
| limit | query | integer | no | Restricts the number of records returned in a recordset to this value. Max value is 500. |
| offset | query | integer | no | Specifies where (an index) in a recordset to begin returning records. |

**Example request**

```bash
curl "https://www.cradlepointecm.com/api/v2/router_alerts/" \
  -H "X-CP-API-ID: <cp-api-id>" \
  -H "X-CP-API-KEY: <cp-api-key>" \
  -H "X-ECM-API-ID: <ecm-api-id>" \
  -H "X-ECM-API-KEY: <ecm-api-key>"
```

**Response 200** — Example response.

```json
{
  "data": [
    {
      "created_at": "2020-12-04T09:20:30.538148+00:00",
      "created_at_timeuuid": "f4442066-3611-11eb-bd86-5ebca3547463",
      "detected_at": "2020-12-04T09:16:16.405000+00:00",
      "friendly_info": "The ethernet port \"Ethernet\" has connected to the network.",
      "info": {
        "alert_type": "ethernet_wan_connected",
        "history": [],
        "info": {
          "mac": "00:30:44:47:cb:09",
          "port": "Ethernet",
          "raw_port": "eth0",
          "reason": "Manual",
          "type": "ethernet",
          "uid": "wan"
        },
        "status": "connected",
        "time": [
          "2020-12-04 09:16:16",
          "UTC"
        ],
        "type": "wan_status_change"
      },
      "router": "https://www.cradlepointecm.com/api/v2/routers/2162719/",
      "type": "ethernet_wan_connected"
    }
  ],
  "meta": {
    "limit": 20,
    "next": null
  }
}
```
