<!-- dev-portal
method: GET
title: History
path: /v2/vehicles/:vehicleId/historical
-->

### GET /v2/vehicles/:vehicleId/historical

Retrieves historical vehicle signals for a given vehicle ID.

#### Request Parameters

| Name       | Type       | Required | Description                                                                                                                        |
|------------|------------|----------|------------------------------------------------------------------------------------------------------------------------------------|
| startAt    | string     | Yes      | Start time of the query window. Must be before `endAt` and within the past year. ISO 8601 formatted datetime string.               |
| endAt      | string     | Yes      | End time of the query window. Must be less than three days after `startAt`. ISO 8601 formatted datetime string.                    |
| resolution | Enum('hr') | No       | Down samples signals to the specified resolution. (Default: null)                                                                  |
| size       | integer    | No       | Number of results to return. (Default: 1000, Max: 1000)                                                                            |
| page       | string     | No       | Pagination cursor. (Default: null)                                                                                                 |
| filters    | string     | No       | Comma separated list of signals to include in response.  ex: position,odometer.  If null, default behavior is to show all signals. |

Note: Page size returned may not be exact (ex: a requested `size` of 1000, may return slightly less than 1000, despite having a next `page` cursor).

#### Response

| Name          | Type                                                               | Description                                                             |
|---------------|--------------------------------------------------------------------|-------------------------------------------------------------------------|
| content       | Array[[VehicleHistoryResponse](../Schemas#vehiclehistoryresponse)] | List of vehicle metadata.  See VehicleMetadata schema for more details. |
| page          | [CursorPage](../Schemas#cursorpage)                                | Object detailing the page information for the current request.          |

##### Response Codes

| Name | Description                                                                                                                                 |
|------|---------------------------------------------------------------------------------------------------------------------------------------------|
| 200  | Ok.                                                                                                                                         |

#### Example

```bash
curl -X GET \
  -H "Authorization: Bearer example" \
  "https://${HOST}/vehicle-status-api/v2/vehicles/${VEHICLE_ID}/historical?startAt=2023-02-01T14:00:00Z&endAt=2023-02-01T15:00:00Z&size=3"

{
  "content" : [
      {
        "vin": "1FMEU111111111111",
        "fuelType": "Gas",
        "signal": {
          "type": "position",
          "value": {
              "latitude": 1.0,
              "longitude": 2.0
          },
          "timestamp": "2023-02-01T14:55:30Z"
        }
      },
      {
        "vin": "1FMEU111111111111",
        "fuelType": "Gas",
        "signal": {
          "type": "odometer",
          "value": 1099.15,
          "timestamp": "2023-02-01T14:55:30Z"
        }
      },
      {
        "vin": "1FMEU111111111111",
        "fuelType": "Gas",
        "signal": {
          "type": "speed",
          "value": 15.6,
          "timestamp": "2023-02-01T14:55:30Z"
        }
      }
  ],
  "page": {
    "cursor": null,
    "size": 3,
    "nextCursor": "1234"
  }
}
```
