# router stream usage samples — NCM API

NCM network traffic between the device and the NetCloud servers, meaning management-plane usage rather than customer traffic. Read-only, a single list call. Use it to account for the overhead NCM itself adds on a metered link.

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

### GET /router_stream_usage_samples/

Get information about router_stream_usage_samples

<p>Use the GET method on this endpoint to retrieve router_stream_usage_samples 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_stream_usage_samples 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_stream_usage_samples 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_stream_usage_samples/" \
  -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": [
    {
      "bytes_in": 3969,
      "bytes_out": 18152,
      "created_at": "2021-02-08T20:19:58.058442+00:00",
      "created_at_timeuuid": "039c15e6-6a4b-11eb-85bc-32c6a22e5b89",
      "period": 3660.510760029996,
      "router": "https://www.cradlepointecm.com/api/v2/routers/2162719/",
      "uptime": 98766.434501786
    }
  ],
  "meta": {
    "limit": 20,
    "next": null
  }
}
```
