Getting Started - DanielAceroJuarez/TMSWebAPI GitHub Wiki
Getting Started
Prerequisites
- .NET Core SDK
- Visual Studio or Visual Studio Code
- Git
Installation
-
Clone the repository:
git clone https://github.com/yourusername/TMSWebAPI.git cd TMSWebAPI
-
Restore dependencies:
dotnet restore
-
Run the application:
dotnet run
Running Tests
-
Navigate to the Tests directory:
cd TMSWebAPI.Tests
-
Run the tests:
dotnet test
Usage
Use an HTTP client like Postman or curl to interact with the API:
-
Get all shipments:
curl -X GET https://localhost:5001/api/shipments
-
Create a new shipment:
curl -X POST https://localhost:5001/api/shipments -H "Content-Type: application/json" -d '{"shipmentId":1,"origin":"New York","destination":"Los Angeles","shipmentDate":"2024-01-01T00:00:00Z","weight":100}'
For more details, refer to the API Reference.