... | ... | @@ -36,7 +36,7 @@ version 1 we will get the following URL: |
|
|
|
|
|
- If the authentication is valid, a response is obtained with the date and time when it was generated, when it expires and the token itself.
|
|
|
|
|
|
```
|
|
|
```json
|
|
|
{
|
|
|
"issuedAt": "2021-04-01T09:09:16.284",
|
|
|
"expiration": "2021-04-02T09:09:16.284",
|
... | ... | @@ -46,7 +46,7 @@ version 1 we will get the following URL: |
|
|
|
|
|
- Also, if a request is made with an expired token, an **HTTP 400 – Bad Request** error is received with the response as in the following example. A new token must be requested to continue making requests to the API.
|
|
|
|
|
|
```
|
|
|
```json
|
|
|
{
|
|
|
"status": 400,
|
|
|
"code": 6,
|
... | ... | @@ -66,7 +66,7 @@ version 1 we will get the following URL: |
|
|
|
|
|
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,
|
... | ... | @@ -101,6 +101,16 @@ These errors will have three main categories: |
|
|
| 9 | Required request body is missing |
|
|
|
| 10 | Event is marked as expired by timestamp |
|
|
|
|
|
|
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
|
|
|
|
|
|
- HTTP Status: **500 - Internal Server Error**
|
... | ... | |