... | ... | @@ -51,6 +51,24 @@ This use case has a REST API for the publication (sending) of the data by the co |
|
|
~~In the topic, the events are published in JSON format. Here you can see an example:~~
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"actionId": "CLI_235",
|
|
|
"beaconId": "cff92179-dc0a-47da-bd9e-5e9c5b14d251",
|
|
|
"beaconTypeId": 2,
|
|
|
"timestamp": "2021-03-15T13:34:00.000Z",
|
|
|
"lonStart": -3.45368,
|
|
|
"latStart": -3.45368,
|
|
|
"lonEnd": 40.36586,
|
|
|
"latEnd": 40.36586,
|
|
|
"hdop": 1,
|
|
|
"deviceTypeId": 1,
|
|
|
"speed": 120,
|
|
|
"eventTypeId": 2,
|
|
|
"provinceId": 40,
|
|
|
"road": "A-601",
|
|
|
"pk": 64.73,
|
|
|
"direction": "UP"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
- ~~actionId (text): unique identifier of the event~~
|
... | ... | @@ -75,6 +93,11 @@ This use case has a REST API for the publication (sending) of the data by the co |
|
|
As stated above, all HTTP responses other than **200 – OK**, can be considered **invalid**. The format of the error response is like the following example:
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"status": 401,
|
|
|
"code": 1,
|
|
|
"message": "User not found or valid"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
These errors will have three main categories:
|
... | ... | @@ -109,6 +132,11 @@ These errors will have three main categories: |
|
|
In the case of getting an error _3 - Missing required property_, the response obtained will have a value in the message that will indicate the missing fields to send:
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"status": 400,
|
|
|
"code": 3,
|
|
|
"message": "[deviceTypeId: must not be null, deviceUseTypeId: must not be null, informationQualityId: must not be null]"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
#### Server Error
|
... | ... | |