API Test
Explore API endpoints and test functionality
[ API Endpoints ]
GET
/api/products
Retrieve all products from the database
Response:
{"success": true, "data": [...]}
GET
/api/products/{id}
Retrieve a single product by ID
Response:
{"success": true, "data": {...}}
POST
/api/products
Create a new product record
Body:
{"name": "...", "price": 0.00}
PUT
/api/products/{id}
Update an existing product
Body:
{"name": "...", "price": 0.00}
DELETE
/api/products/{id}
Delete a product by ID
Response:
{"success": true, "message": "..."}
[ Data Schema ]
Field
Type
Description
id
INT
Auto-increment primary key
name
VARCHAR(255)
Product name (required)
description
TEXT
Product description
price
DECIMAL(10,2)
Product price
rating
INT(1-5)
Rating from 1 to 5
image
VARCHAR(512)
URL to product image
date_created
DATETIME
Auto-set on creation
date_modified
DATETIME
Auto-updated on change
--
Records
5
Endpoints
REST
Protocol