... | ... | @@ -45,10 +45,11 @@ En el tópico se publican los eventos en formato JSON. Aquí se puede ver un eje |
|
|
|
|
|
```json
|
|
|
{
|
|
|
"municipalityIneCode":50297,
|
|
|
"cityIne":50297,
|
|
|
"parkingId":1,
|
|
|
"freeCapacity":4,
|
|
|
"totalCapacity":5
|
|
|
"free":4,
|
|
|
"capacity":5,
|
|
|
"timestamp":"2021-03-15T13:34:00.000Z"
|
|
|
}
|
|
|
```
|
|
|
|
... | ... | @@ -56,9 +57,11 @@ En el tópico se publican los eventos en formato JSON. Aquí se puede ver un eje |
|
|
|
|
|
- parkingId (número entero): identificador del aparcamiento
|
|
|
|
|
|
- freeCapacity (número entero): número de plazas libres del aparcamiento
|
|
|
- free (número entero): número de plazas libres del aparcamiento
|
|
|
|
|
|
- totalCapacity (número entero): capacidad total del aparcamiento
|
|
|
- capacity (número entero): capacidad total del aparcamiento
|
|
|
|
|
|
- timestamp (fecha UTC): fecha y hora en formato UTC del momento en el que el parking se ha actualizado por última vez. Es necesario que no sea un timestamp futuro con respecto a la hora UTC actual. La fecha debe finalizar con el caracter 'Z' que marca que está en UTC
|
|
|
|
|
|
Ver más información y un ejemplo de conexión [aquí](https://gitlab.cs.cmobility30.es/dgt3.0_esp/general/-/wikis/MQTT).
|
|
|
|
... | ... | @@ -117,6 +120,7 @@ Estos errores tendrán tres categorías principales: |
|
|
| 15 | Free capacity should not be greater than total capacity |
|
|
|
| 16 | Invalid GeoJson |
|
|
|
| 17 | GeoJson does not belong to municipality |
|
|
|
| 18 | Timestamp cannot be future |
|
|
|
|
|
|
En el caso de obtener un *error 3 - Missing required property* la respuesta obtenida tendrá un valor en el *message* que nos indicará los campos que faltan por enviar:
|
|
|
|
... | ... | @@ -124,7 +128,7 @@ En el caso de obtener un *error 3 - Missing required property* la respuesta obte |
|
|
{
|
|
|
"status": 400,
|
|
|
"code": 3,
|
|
|
"message": "[deviceTypeId: must not be null, deviceUseTypeId: must not be null, informationQualityId: must not be null]"
|
|
|
"message": "[cityIne: must not be null, parkingId: must not be null, timestamp: must not be null]"
|
|
|
}
|
|
|
```
|
|
|
|
... | ... | @@ -134,4 +138,4 @@ En el caso de obtener un *error 3 - Missing required property* la respuesta obte |
|
|
|
|
|
| Code | Message |
|
|
|
| ---- | -------------- |
|
|
|
| 18 | Internal error | |
|
|
\ No newline at end of file |
|
|
| 19 | Internal error | |
|
|
\ No newline at end of file |