# router lans — NCM API

The layer 3 LANs configured on your devices, one record per LAN. Read-only, a single list call. Pair it with lan clients for the devices actually attached to those LANs, and forwarding lan details for how their traffic is forwarded.

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

### GET /router_lans/

Get information about router_lans

Use the GET method on this endpoint to retrieve router_lans records. Use the available filtering fields to narrow or broaden your search.

| 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> |
| id | query | in: int<br />out: url | no | ID of the router_lans record |
| id__gt | query | integer | no | Filter results to items with ID greater than specified value (cursor pagination) |
| id__gte | query | integer | no | Filter results to items with ID greater than or equal to specified value |
| id__lt | query | integer | no | Filter results to items with ID less than specified value |
| id__lte | query | integer | no | Filter results to items with ID less than or equal to specified value |
| account | query | in: int<br />out: url | no | Account that owns the router_lans record |
| router | query | in: int<br />out: url | no | Router ID |
| name | query | string | no | Name of the router_lans record |
| ip_address | query | string | no | IP address associated with the router_lans record |
| enabled | query | boolean | no | Enabled/disabled state of a router_lans record |
| expand | query | integer (router) | no | Specifies that the returned value for the passed in attribute be expanded in the response body. |
| 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_lans/" \
  -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": [
    {
      "account": "https://www.cradlepointecm.com/api/v2/accounts//",
      "created_at": "2019-04-12T14:28:38.423098+00:00",
      "enabled": true,
      "id": "2147873",
      "ip_address": "192.168.17.1",
      "name": "Primary LAN",
      "netmask": "255.255.255.0",
      "resource_url": "https://www.cradlepointecm.com/api/v2/router_lans/2147873/",
      "router": "https://www.cradlepointecm.com/api/v2/routers/1284575/",
      "updated_at": "2020-12-21T00:22:56.363885+00:00"
    },
    {
      "account": "https://www.cradlepointecm.com/api/v2/accounts//",
      "created_at": "2020-11-18T17:06:23.672117+00:00",
      "enabled": true,
      "id": "3999183",
      "ip_address": "192.168.0.1",
      "name": "Primary LAN",
      "netmask": "255.255.255.0",
      "resource_url": "https://www.cradlepointecm.com/api/v2/router_lans/3999183/",
      "router": "https://www.cradlepointecm.com/api/v2/routers/2174016/",
      "updated_at": "2021-02-21T10:01:33.093821+00:00"
    },
    {
      "account": "https://www.cradlepointecm.com/api/v2/accounts//",
      "created_at": "2020-11-18T17:06:23.687020+00:00",
      "enabled": false,
      "id": "3999184",
      "ip_address": "192.168.11.1",
      "name": "Guest LAN",
      "netmask": "255.255.255.0",
      "resource_url": "https://www.cradlepointecm.com/api/v2/router_lans/3999184/",
      "router": "https://www.cradlepointecm.com/api/v2/routers/2174016/",
      "updated_at": "2021-02-21T10:01:33.101744+00:00"
    }
  ],
  "meta": {
    "limit": 20,
    "next": null,
    "offset": 0,
    "previous": null
  }
}
```
