Real REST API Documentation (For Demo & Testing)
A real, free, and robust REST API supporting all major HTTP methods for learning and testing purposes.
Prepared by:
Md. Ebrahim Hossain
SQA Engineer at Achieve Test Prep (Newark, US)
Source API: restful-api.dev
Base URL
The primary endpoint for all API calls is:
https://restful-api.dev/api/v1
CRUD Operations (Resource: Items)
1. Create New Item
POST
/items/
Status Code: 201
Request Body (JSON Example)
{
"name": "API Testing Kit",
"description": "Tools for QA Automation",
"price": 49.99
}
Response (201 Created)
HTTP/1.1 201 Created { "id": 101, "name": "API Testing Kit", "description": "Tools for QA Automation", "price": 49.99, "created_at": "2025-12-04T12:00:00Z" }
2. Get All Items
GET
/items/
Status Code: 200
Request
GET /api/v1/items/ HTTP/1.1 Host: restful-api.dev
Response (200 OK)
HTTP/1.1 200 OK [ { "id": 1, "name": "Sample Item 1", "price": 10.00 }, { "id": 2, "name": "Sample Item 2", "price": 25.50 } ... more items ... ]
3. Update Item (Full Replacement)
PUT
/items/{id}
Status Code: 200
Request Body (Full Object Required)
{
"name": "Updated API Kit",
"description": "The full replacement object.",
"price": 55.00
}
Response (200 OK)
HTTP/1.1 200 OK { "id": 101, "name": "Updated API Kit", "description": "The full replacement object.", "price": 55.00, "updated_at": "2025-12-04T12:05:00Z" }
4. Update Item (Partial Modification)
PATCH
/items/{id}
Status Code: 200
Request Body (Only Modified Fields)
{
"price": 30.00,
"stock": 15
}
Response (200 OK)
HTTP/1.1 200 OK { "id": 101, "name": "Updated API Kit", "price": 30.00, ... other original fields ... "stock": 15 }
5. Delete Item
DELETE
/items/{id}
Status Code: 204
Request
Deletion requests typically require no body and may sometimes require authentication (not required here).
DELETE /api/v1/items/101 HTTP/1.1 Host: restful-api.dev
Expected Response
HTTP/1.1 204 No Content # Successful deletion returns an empty body.