diff --git a/Controllers/api/PortCaptaincyApiController.cs b/Controllers/api/PortCaptaincyApiController.cs new file mode 100644 index 0000000..eab4d6f --- /dev/null +++ b/Controllers/api/PortCaptaincyApiController.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Mvc; +using ShipServicesApp.Services; + +namespace ShipServicesApp.Controllers.api +{ + [ApiController] + [Route("api/[controller]")] + public class PortCaptaincyApiController : ControllerBase + { + private readonly DemoDataService _data; + public PortCaptaincyApiController(DemoDataService data) => _data = data; + + [HttpGet] + public IActionResult GetAll() => Ok(_data.PortCaptains); + } +} diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml index e476e3b..4941510 100644 --- a/Views/Home/Index.cshtml +++ b/Views/Home/Index.cshtml @@ -22,6 +22,70 @@ + +
+
+
+

Get Started with API

+
+
+

Quick start guide for demo participants to try our REST APIs

+ +
+
+
Available Endpoints
+
+
+
Ship Agencies API
+ /api/ShipAgenciesApi +

Returns all ship agencies with contact details

+
+
+
Port Captaincy API
+ /api/PortCaptaincyApi +

Returns all port captains and their assigned ports

+
+
+
+ +
+
Usage Notes
+
    +
  • + Try it now: +

    Click on any endpoint URL below or visit Swagger UI for interactive testing

    +
  • +
  • + HTTP Method: +

    All endpoints support GET requests to retrieve data

    +
  • +
  • + Response Format: +

    JSON formatted responses with demo data

    +
  • +
  • + No Auth Required: +

    Demo APIs are open for testing purposes

    +
  • +
+
+
+ +
+
Quick Test Example:
+ curl http://<your-host>/api/ShipAgenciesApi + curl http://<your-host>/api/PortCaptaincyApi +
+ + +
+
+
+