This project is a Django-based RESTful API implementation for CRUD operations on employee details.
- Implements CRUD operations (Create, Read, Update, Delete) for managing employee details.
- Utilizes Django Framework and Django Rest Framework for efficient API development.
- Clone the repository:
git clone https://github.com/rushiaglave/restAPI_CRUD.git
- Install dependencies:
pip install djangorestframework
- Apply database migrations:
python manage.py migrate
To start the server, run:
python manage.py runserver
- admin/ - Django administration panel.(username and password both is admin)
- task-list/ - Get a list of all employees.
- task-listid/{pk}/ - Get a list of employees by there unique id
- task-create/ - Create a new employee record.
- task-update/{pk}/ - Update an employee record by ID.
- task-delete/{pk}/ - Delete an employee record by ID.
POST /task-create/
Content-Type: application/json
{
"id": 1,
"firstname": "John",
"lastname": "Doe",
"emp_id": 1234
}
PUT /task-update/1/
Content-Type: application/json
{
"id": 1,
"firstname": "John",
"lastname": "Doe",
"emp_id": 5678
}
DELETE /task-delete/1/
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.