# historical locations — NCM API

The history of positions a device has reported, rather than just its latest fix. Read-only, a single list call filtered by device. Use it to reconstruct a vehicle or asset's route over time; locations holds the current position.

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

### GET /historical_locations/

Get information about historical_locations

Use the GET method on this endpoint to retrieve historical_locations 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> |
| router | query | integer | yes | The ID of the router that sent the location data. This parameter is REQUIRED. Only one router ID may be specified per query; you can't provide a list of router IDs to this endpoint. |
| created_at__gt | query | ISO datetime | no | Return only data points with created_at timestamps AFTER this datetime. If no timezone is specified, UTC is assumed. |
| created_at_timeuuid__gt | query | UUID | no | Return only data points with created_at_timeuuid values AFTER this UUID. Using this query parameter causes the query to skip older data points which were recorded before the created_at_timeuuid field was added. A unique ID associated with the created_at timestamp |
| created_at__lte | query | ISO datetime | no | Return only data points with created_at timestamps ON OR BEFORE this. If limit is reached first then this parameter does not apply. |
| limit | query | integer | no | Return no more than this many location data points. If created_at__lte is reached first then this parameter does not apply. |
| 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/historical_locations/" \
  -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
{
  "created_at": "2021-02-06T21:38:01.447270Z",
  "ecio": null,
  "rfband_5g": null,
  "rsrq_5g": null,
  "net_device_name": "wwan-60:38:e0:35:f2:96:2_4G-1",
  "rsrq": null,
  "mph": 52.71,
  "signal_percent": null,
  "sinr": null,
  "longitude": -116.07866,
  "dbm": null,
  "rfband": null,
  "created_at_timeuuid": "964d01fa-68c3-11eb-8000-000000000000",
  "latitude": 44.82413,
  "cinr": null,
  "carrier_id": null,
  "sinr_5g": null,
  "rsrp_5g": null,
  "summary": null,
  "rssi": null,
  "rsrp": null,
  "accuracy": 2
}
```
