# getAlerts(JSON dataAlert)

Al invocar este método, se obtiene las alertas generadas en la fecha indicada por un equipo o todos los equipos del usuario 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><div><table class="table" style="height: 164px; 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;">Equipo del cual se requieren las alertas</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"><div><div>fecha</div></div></td><td style="width: 301px; height: 41px;">FORMATO: aaaa-mm-dd -&gt; Fecha de la cual se desean obtener las alertas</td></tr></tbody></table>

</div></div><div><span style="color: #bbbbbb; font-size: 1.4em; font-weight: 400;">Ejemplo de JSON:</span></div></details>```JavaScript
let dataAlert = {
  equipo : 19566,
  fecha : '2021-01-12',
};
```

<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 alert  = await _gpsApiv2.getAlerts(dataAlert); 
 	} 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: 656px; 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;">Equipo asignado al vehículo que ejecutó la alerta</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**Fecha**</td><td style="width: 301px; height: 41px;"> Fecha en la que la alerta se ejecutó</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**Hora**</td><td style="width: 301px; height: 41px;"> Hora de la alerta (se maneja en formato 24Hrs)</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**Descripción**</td><td style="width: 301px; height: 41px;">Texto descriptivo de la alerta</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**Latitud**</td><td style="width: 301px; height: 41px;">Latitud correspondiente al punto en que se originó la alerta</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**Longitud**</td><td style="width: 301px; height: 41px;"> Longitud correspondiente al punto en que se originó la alerta</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**Domicilio**</td><td style="width: 301px; height: 41px;">Dirección correspondiente a la latitud y longitud reportada por el equipo</td></tr></tbody></table>

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

```JSON
[0:{
	 Equipo:'19566'
	 Fecha:'2021-01-12'
	 Hora:'13:51:27'
	 Descripcion:'Unidad POP-1234 Genero EXCESO DE VEOLCIDAD (144 Km/h) el 2021/01/12 13:51:27'
	 Latitud:19.045996375951226
	 Longitud:'-98.22521173957284'
	 Domicilio:Avenida 25 Poniente 2902, Santa Cruz Los Angeles, 72400 Heróica Puebla de Zaragosa
}]

```