The objective of the API is to create new functionalities such as creating an advanced search function that allows filtering cases based on more personable criteria, and thus improve the obtaining of information on cases of public significance in Ecuador, which are officially detailed on the website of the Attorney General's Office. This will help mitigate misinformation on social networks by having official information easily obtained with the new implemented functionalities.
RESTful API Deployment URL: https://laboratorio-12-13.onrender.com
To create, update, or delete data in the RESTful API, you must register and then log in using a REST Client (e.g. Postman). Credentials are included in the request body, and once logged in, a token is sent to you in the response for use within one hour. This token goes in the authentication header of the request when using the API's private routes.
Route to register new user account:
POST /api/v1/users/register
Route to log in to the registered user account:
POST /api/v1/users/login
In the request body include the following properties:
{
"username": "Your username",
"email":"Your email",
"password": "Your password"
}
In private routes (POST, PUT and DELETE) include the token granted upon login in the authentication headers to make use of the API
{
"rute": [],
"capacity":{
"blue": number,
"yellow": number,
"green": number
},
"startsAt":"",
"endsAt":"",
ย ย "driverId":number
}
POST /api/v1/tankers
GET /api/v1/tankers
GET /api/v1/tankers/{id}
PUT /api/v1/tankers/{id}
DELETE /api/v1/takers/{id}