Skip to content

RESTful API that operates on the character database of The Boys series, allowing the creation, retrieval, update, and deletion of character records.

Notifications You must be signed in to change notification settings

mthaugusto/the-boys-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

API Documentation - Character Management

Overview

RESTful API that operates on the character database of The Boys series, allowing the creation, retrieval, update, and deletion of character records.

Base URL

http://localhost:8080/seriesapi/webapi/personagens

Methods

1. List All Characters

Method: GET

URL: /personagens

Description: Retrieves a list of all characters from "The Boys" series.

Success Response: Code 200 (OK)

Response Example:

		    

[ { "id": 1, "nome": "Homelander", "idade": "41", "especie": "Super", "genero": "Masculino", "corDoCabelo": "Loiro", "corDosOlhos": "Azul", "altura": "1.80m", "peso": "74.84Kg", "status": "Vivo" }, // Other characters... ]

2. Get a Character by ID

Method: GET

URL: /personagens/{id}

URL Parameters: {id}: The ID of the character you want to retrieve.

Description: Retrieves details of a character based on the provided ID.

Success Response: Code 200 (OK)

Response Example:

		    

{ "id": 1, "nome": "Homelander", "idade": "41", "especie": "Super", "genero": "Masculino", "corDoCabelo": "Loiro", "corDosOlhos": "Azul", "altura": "1.80m", "peso": "74.84Kg", "status": "Vivo" },

3. Create a New Character

Method: POST

URL: /personagens

Description: Creates a new character with the provided details.

Request Body:

			

{ "nome": "New Character", "idade": "30", "especie": "Super", "genero": "Masculino", "corDoCabelo": "Preto", "corDosOlhos": "Verde", "altura": "1.85m", "peso": "80.00Kg", "status": "Vivo" }

Success Response: Code 201 (Created)

4. Update a Character

Method: PUT

URL: /personagens/{id}

URL Parameters: {id}: The ID of the character you want to update.

Description: Updates the details of a character based on the provided ID.

Request Body (fields to be updated):

		

{ "nome": "New Name", "idade": "31", "status": "Dead" }

Success Response: Code 200 (OK)

5. Delete a Character

Method: DELETE

URL: /personagens/{id}

URL Parameters: {id}: The ID of the character you want to delete.

Description: Deletes a character based on the provided ID.

Success Response: Code 204 (No Content)

About

RESTful API that operates on the character database of The Boys series, allowing the creation, retrieval, update, and deletion of character records.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages