Trail Feature Management Microservice

Welcome to the Trail Feature Management Microservice. This microservice allows you to manage trail features and user authentication for your trail-based application.

Swagger Documentation

Please visit the endpoint /apidocs to access the swagger documentation for this API

/apidocs

This page is not swagger documentation, this is a summary page I created (using HTML/CSS) to provide an overview of the available endpoints, supplementary to the swagger documentation.

Available Endpoints

1. Get All Trails

GET: /trails

Retrieves a list of all trails, including details like title, description, duration, elevation gain, distance, difficulty, route type, and location.

2. Select All from Trails

GET: /trails/selectall

Returns raw data from the trails table in the database, initally created for debugging purposes.

3. Health Check

GET: /health

Checks the health of the API and verifies if the database is reachable.

4. Get a Single Trail

GET: /trail/{id}

Retrieves details of a specific trail by its TrailID.

5. Get Trail Points

GET: /trail/{id}/points

Returns all GPS points associated with a specific trail, including latitude, longitude, and position number.

6. Create a New Trail

POST: /trail/create

Creates a new trail and returns the new TrailID and LocationID in the response.

7. Edit a Trail

POST: /trail/edit

Updates the details of an existing trail by TrailID.

8. Search for Trails

POST: /trails/search

Searches for trails based on various parameters, including title, difficulty, route type, city, county, and country.

9. Add Trail Points

POST: /trail/{id}/points/add

Adds GPS points to a specific trail by TrailID.

10. Delete a Trail

DELETE: /trail/{id}/delete

Deletes a specific trail by its TrailID.

11. Create a Trail Feature

POST: /trails/features/create

Adds a new feature to the system, such as "Waterfall" or "Scenic Viewpoint".

12. Get All Trail Features

GET: /trails/features/get

Retrieves a list of all available trail features.

13. Delete a Trail Feature

DELETE: /trails/features/delete/{id}

Removes a specific trail feature by its TrailFeatureID.

14. Add a Feature to a Trail

POST: /trail/{id}/features/add

Assigns a feature to a specific trail by TrailID.

15. Remove a Feature from a Trail

POST: /trail/{id}/features/remove

Removes an assigned feature from a trail by TrailID.

16. Get Features Associated with a Trail

GET: /trail/{id}/features/get

Retrieves all features assigned to a specific trail by TrailID.

17. Validate a User

POST: /users/validate

Validates a user's credentials and returns their authentication status, admin status, and UserID.

18. Add a New User

POST: /users/add

Adds a new user to the system, verifying their existence through the authenticator API.

19. Get Cities

GET: /cities

Retrieves a list of cities along with their corresponding counties and countries.

20. Search Cities

POST: /cities/search

Searches for cities by name, county, or country.

21. Get Counties

GET: /counties

Retrieves a list of counties along with their corresponding countries.

22. Search Counties

POST: /counties/search

Searches for counties by name or country.

23. Get Countries

GET: /countries

Retrieves a list of all countries.

24. Search Countries

POST: /countries/search

Searches for countries by name.

25. Add a City

POST: /cities/add

Adds a new city to the system.

26. Add a County

POST: /counties/add

Adds a new county to the system.

27. Add a Country

POST: /countries/add

Adds a new country to the system.

28. Delete a City

DELETE: /cities/delete

Deletes a city by its CityID.

29. Delete a County

DELETE: /counties/delete

Deletes a county by its CountyID.

30. Delete a Country

DELETE: /countries/delete

Deletes a country by its CountryID.