Welcome to MyHeroAPI, a challenge project for W2M. This API is designed to manage heroes.
- Version: 1.0
- URL: http://localhost:8080
- Swagger: http://localhost:8080/api-docs
- URL:
/hero/{id}
- Description: Retrieve a hero by their ID.
- Parameters:
id
(path) - The ID of the hero (integer)
- Responses:
200
: Hero retrieved successfully404
: Hero not found
- URL:
/hero/{id}
- Description: Modify a hero based on their ID.
- Parameters:
id
(path) - The ID of the hero (integer)
- Request Body: JSON object representing the hero
- Responses:
200
: Hero modified successfully400
: Bad request404
: Hero not found
- URL:
/hero/{id}
- Description: Delete a hero by their ID.
- Parameters:
id
(path) - The ID of the hero (integer)
- Responses:
204
: Hero deleted successfully404
: Hero not found500
: Internal server error
- URL:
/hero
- Description: Retrieve a list of all heroes.
- Responses:
200
: List of heroes retrieved successfully
- URL:
/hero
- Description: Create a new hero and return the created hero.
- Request Body: JSON object representing the hero
- Responses:
201
: Hero created successfully
- URL:
/hero/search
- Description: Find heroes whose names contain the provided search parameter.
- Parameters:
searchParameter
(query) - Search parameter (string)
- Responses:
200
: Heroes found successfully
- Properties:
id
(integer, int64) - The ID of the heroname
(string) - The name of the herodescription
(string) - The description of the herodob
(string, date) - Date of birth of the heroage
(integer, int32) - The age of the hero
- Purpose: MyHeroAPI is a challenge project for W2M, designed for managing heroes.
- Contact: For more information, please contact Carlos Uriel at [email protected].
- Documentation: For in-depth details, please refer to the Swagger documentation.