# getHistory(JSON dataHistory)

Al invocar este método, se obtiene el detalle completo de eventos históricos de un equipo dado, en un rango de fechas, la información se retorna en formato JSON

<div id="bkmrk-"></div><div id="bkmrk--0"></div><details class="mb-m" id="bkmrk-body-parametersparam" open="open"><summary class="text-muted">Definición de atributos que deben ser incluidos en el objeto JSON que se recibe como parámetro al realizar la solicitud:</summary>

<div></div><div><table class="table" style="height: 205px; width: 619px;" width="811"><tbody><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**Atributos**</td><td style="width: 301px; height: 41px;">Definición </td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"><div><div>equipo</div></div></td><td style="width: 301px; height: 41px;">IMEI o Identificador único del dispositivo configurado en la plataforma</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"><div><div>fechaIni</div></div></td><td style="width: 301px; height: 41px;">Fecha inicial de los datos: 'aaaa-mm-dd hh:mm:ss'</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"><div><div><div><div>fechaFin</div></div></div></div></td><td style="width: 301px; height: 41px;">Fecha final de los datos: 'aaaa-mm-dd hh:mm:ss'</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"><div><div><div><div>format</div></div></div></div></td><td style="width: 301px; height: 41px;">Formato de las fechas a pocesar, por default <div><div>'DateTime'</div></div></td></tr></tbody></table>

</div><div><span style="color: #bbbbbb; font-size: 1.4em; font-weight: 400;">Ejemplo de JSON:</span></div></details>```JavaScript
let dataAlert = {
  equipo : '356486080930374',
  fechaIni : '2021-01-12 00:00:00',
  fechaFin : '2021-01-12 23:59:59',
  format : 'DateTime',
};
```

<div id="bkmrk-ejemplo-de-solicitud"><span style="color: #bbbbbb; font-size: 1.4em; font-weight: 400;">Ejemplo de solicitud en JS:</span></div>```JavaScript
try {
      const history  = await _gpsApiv2.getHistory(dataHistory); 
 	} catch (error) {
	  console.error(error);
	}
```

<details class="mb-m" id="bkmrk-definici%C3%B3n-de-atribu"><summary class="text-muted">Definición de atributos de la respuesta:</summary>

<div></div><div><table class="table" style="height: 1558px; width: 619px;" width="811"><tbody><tr style="height: 41px;"><th style="width: 320px; height: 41px;">**Atributos**</th><th style="width: 301px; height: 41px;">Definición </th></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**equipo**</td><td style="width: 301px; height: 41px;">Número de serie o IMEI que permite identificar el dispositivo</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**latitud**</td><td style="width: 301px; height: 41px;">Latitud de la posición del vehículo</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**longitud**</td><td style="width: 301px; height: 41px;">Longitud de la posición del vehículo</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**iporigen**</td><td style="width: 301px; height: 41px;">IP de origen de reporte del equipo GPS</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**puerto**</td><td style="width: 301px; height: 41px;"> Puerto de origen de reporte del equipo GPS</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idstatus**</td><td style="width: 301px; height: 41px;">Status de la información que reportó el equipo: 1 = Información actual, 2 = Información a futuro</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**gmt**</td><td style="width: 301px; height: 41px;">Fecha hora de la posición del vehículo</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**fecha\_reporte**</td><td style="width: 301px; height: 41px;">Fecha hora de la posición del vehículo</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idevento**</td><td style="width: 301px; height: 41px;">Identificador del evento que reportó el equipo GPS</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**nombre\_evento**</td><td style="width: 301px; height: 41px;">Nombre del evento que reportó el equipo GPS</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**velocidad**</td><td style="width: 301px; height: 41px;">Velocidad en km/h que detecta el equipo GPS</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**orientacion**</td><td style="width: 301px; height: 41px;">Orientación en grados en la que reportó el equipo GPS</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**serial**</td><td style="width: 301px; height: 41px;">Señal GSM del equipo GPS</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**satelites**</td><td style="width: 301px; height: 41px;">Cantidad de satélites</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**inputs**</td><td style="width: 301px; height: 41px;">Estados de cada entrada del equipo, 0 = D</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**combustible**</td><td style="width: 301px; height: 41px;">Porcentaje (%) del nivel de combustible del sensor 1</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**consumocomb**</td><td style="width: 301px; height: 41px;">Litros (lts) del consumo anterior de combustible del sensor 1</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**listroscomb**</td><td style="width: 301px; height: 41px;">Litros (lts) del nivel de combustible del sensor 1</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**combustible2**</td><td style="width: 301px; height: 41px;">Porcentaje (%) del nivel de combustible del sensor 2</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**consumocomb2**</td><td style="width: 301px; height: 41px;">Litros (lts) del consumo anterior de combustible del sensor 2</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**litroscomb2**</td><td style="width: 301px; height: 41px;">Litros (lts) del nivel de combustible del sensor 2.</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**voltajecomb**</td><td style="width: 301px; height: 41px;">Voltaje (v), que envía la entrada análoga del equipo GPS.</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**cuadalimetro**</td><td style="width: 301px; height: 41px;"> Medición del caudal.</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**odometro**</td><td style="width: 301px; height: 41px;">Metros (mts) que ha recorrido el vehículo, detectado por el GPS.</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**bateria\_gps**</td><td style="width: 301px; height: 41px;">Porcentaje o voltaje del nivel de la batería interna del GPS</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**bateria\_veh**</td><td style="width: 301px; height: 41px;">Voltaje (v) de la batería del vehículo.</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**temperatura**</td><td style="width: 301px; height: 41px;">Grados (°) del primer sensor de temperatura</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**temperatura2**</td><td style="width: 301px; height: 41px;">Grados (°) del segundo sensor de temperatura</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**ignicion**</td><td style="width: 301px; height: 41px;">Status Ignición: 0 = OFF, 1 = ON, 2 = Desconocida</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idConductor**</td><td style="width: 301px; height: 41px;">Id del conductor autentificado</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**de\_buffer**</td><td style="width: 301px; height: 41px;">Status del tipo de reporte</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**contador\_pasajeros**</td><td style="width: 301px; height: 41px;">Cantidad de pasajeros, Sensor de contador de pasajeros.</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**OBD\_rpm\_motor**</td><td style="width: 301px; height: 41px;">Revoluciones por minuto del motor, OBDII.</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**OBD\_carga\_motor**</td><td style="width: 301px; height: 41px;">Porcentaje de la carga de motor, OBDII</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**OBD\_temperatura\_anticong**</td><td style="width: 301px; height: 41px;">Grados de la temperatura de anticongelante, OBDII.</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**OBD\_posicion\_aclerador**</td><td style="width: 301px; height: 41px;">Porcentaje de la posición del acelerador, OBDII.</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**datos\_extras**</td><td style="width: 301px; height: 41px;">Valores que son obtenidos del protocolo OBDII</td></tr><tr><td style="width: 320px;">**grupo**</td><td style="width: 301px;"> Grupo al que pertenece el vehículo.</td></tr><tr><td style="width: 320px;">**conductor**</td><td style="width: 301px;">Conductor asociado al vehículo.</td></tr><tr><td style="width: 320px;">**patente**</td><td style="width: 301px;">Placa / patente del activo</td></tr><tr><td style="width: 320px;">**activo**</td><td style="width: 301px;">Nombre con el que se identifica el vehículo dentro de la plataforma.</td></tr></tbody></table>

</div></details>##### Respuesta de ejemplo:

```JSON
[0:{
	 'equipo':'356486080930374',
	 'latitud':'18.983685420160437',
	 'longitud':'-98.22891569128842',
	 'iporigen':'',
	 'puerto':'',
	 'idstatus':'1',
	 'gmt':'0',
	 'fecha_reporte':'20190612120236',
	 'idevento':'1',
	 'velocidad':'75',
	 'orientacion':'90',
	 'senal':'5',
	 'satelites':'1',
	 'inputs':'',
	 'combustible':'-1',
	 'consumocomb':'-1',
	 'litroscomb':'-1',
	 'combustible2':'-1',
	 'consumocomb2':'-1',
	 'litroscomb2':'-1',
	 'voltageomb':'-1',
	 'caudalietro':'-1',
	 'odometro':'-1',
	 'odometro_veh':'0',
	 'bateria_gps':'100',
	 'bateria_veh':'12',
	 'temperatura':'-1',
	 'temperatura2':'-1',
	 'ignicion':'2',
	 'idconductor':'0',
	 'domicilio':'Carretera Federal 190, Ampliación Arboledas de Loma Bella, Heróica Puebla deZaragoza, Pue., México',
	 'de_buffer':'0',
	 'contador_pasajeros':'-1',
	 'obd_rpm_motor':'481',
	 'obd_carga_motor':'29',
	 'obd_temperatura_anticong':'16',
	 'obd_posicion_acelerador':'70',
	 'datos_extras':'{
		 'obd_fuel_level':'58'
		 'obd_engine_speed':'677'
		 'obd_total_engine_hours':'559'
		 'obd_engine_temperatura':'434'
		 'obd_vehicle_speed':'79'
		 'obd_driving_time':'65'
		 'obd_engine_percent_load':'79'
		 'time_stamp_insert':'20190612170203'
	 }',
	 'grupo':'Reportes',
	 'conductor':'Pablo Calvo',
	 'patente':'POP-1234',
	 'activo':'Polo',
}]

```