Visual Guide Rest API

Dragon Ball API - Route Documentation

This document provides a visual representation and explanation of all the available routes in the Dragon Ball API. Each image corresponds to a specific route, followed by a brief explanation of its functionality.


1. Get Random Question

Random Question Endpoint

This route returns a random question and answer related to Dragon Ball from the database.


2. Get by ID

Get by ID Endpoint

This route retrieves data by a specific ID. Pass the ID in the URL to get the corresponding data from the database.


3. Add Data to API

Add Data Endpoint

Use this route to add new data to the Dragon Ball API. The request is a POST request, and the database is updated accordingly.


4. Update Data (PUT)

PUT Request

This route is used to fully update a record in the API. The PUT request allows you to replace the existing data for a specific ID with new information.

PUT Request in Database

The database is updated after the PUT request is made.


5. Partially Update Data (PATCH)

PATCH Request

This route allows for partial updates to a record. A PATCH request modifies only the specific fields you provide.

PATCH Request in Database

The database reflects the partial updates after the PATCH request is executed.


6. Get Admin Token

Get Token

To authenticate as an admin, use this route to obtain a token. You must provide valid admin credentials to receive the token.


7. Delete One Record (Authenticated)

Delete One Record

This authenticated route allows you to delete a specific record from the database.

Database after Deletion

The database is updated after the deletion is performed.


8. Delete All Records (Authenticated)

Delete All Records

This route allows an authenticated admin to delete all records in the database.

Database Re-initialized After Deletion

After the deletion of all records, the database is automatically reinitialized with default data.


General Route Overview

Route Overview

This image provides a high-level overview of all the available routes in the Dragon Ball API and their respective functionalities.


Backend Console

Backend Console

This image demonstrates the working of the backend console while the API handles various requests.