A RESTful API for managing a business's product catalog with rate limiting to prevent abuse and ensure fair usage.
Base URL: https://inventory-manager-api-tzwk.onrender.com
- Swagger UI:
/api/docs/ - ReDoc UI:
/api/redoc/
Use Postman to test the API easily.
- Click the button above OR import the collection manually.
- Download collection:
inventory_manager_api.postman_collection.json
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/products/ |
Retrieve all products |
| GET | /api/v1/products/{id}/ |
Get details of a specific product |
| POST | /api/v1/products/ |
Add a new product |
| PUT | /api/v1/products/{id}/ |
Update product details |
| DELETE | /api/v1/products/{id}/ |
Delete a product |
- RESTful endpoints for CRUD operations on products
- Rate limiting (100 requests per minute per IP)
- Pagination for large collections
- Professional RESTful responses with proper status codes
- Validation for all required fields
- No authentication required (as per requirements)
For full API documentation, visit our GitHub Pages.
- Django 4.2
- Django REST Framework
- Python 3.10+
- Python 3.10+
- pip
-
Clone the repository
git clone https://github.com/SilverbackOssi/Inventory-manager-API.git cd Inventory-manager-API -
Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Apply migrations
python manage.py makemigrations python manage.py migrate
-
Run the development server
python manage.py runserver
-
Access the API at
http://localhost:8000/api/v1/products/
All endpoints are rate-limited to 100 requests per minute per IP address. The following headers are included in each response:
X-RateLimit-Limit: The maximum number of requests allowed per time windowX-RateLimit-Remaining: The number of requests remaining in the current time windowX-RateLimit-Reset: Time in seconds until the rate limit is reset
This API implements RESTful best practices:
- Proper use of HTTP verbs (GET, POST, PUT, DELETE)
- Resource-based URLs
- API versioning
- Consistent response format
- Appropriate HTTP status codes
- Pagination for collections
- Rate limiting with informative headers
This project is licensed under the MIT License - see the LICENSE file for details.