This endpoint initializes the database with predefined ports.
curl -X POST http://localhost:7070/ports/init
This endpoint creates a new boat with a specified boatId
, startPort
, and endPort
.
curl -X POST http://localhost:7070/boats \ -H "Content-Type: application/json" \ -d '{ "boatId": "BOAT006", "startPort": "New York", "endPort": "Lisbon" }'
Retrieve the details of all boats currently stored in the database.
curl -X GET http://localhost:7070/boats
Retrieve the details of a specific boat by its boatId
.
curl -X GET http://localhost:7070/boats/BOAT006
Run the simulation to update each boat's position toward its destination.
curl -X POST http://localhost:7070/simulate