Simple api using Django Rest Framework.
To deploy this project run
python manage.py runserver
Documentation Project has three branches. Each branch represents a way to implement api in DRF.
Here first function based api view been implemented then class based api view been implemented.
Api has been implenemted with GenericAPIView and ModelMixins.
Api has been implemented with ConcreteViewClass.
GET /studentapi/
Get all student from the table.
GET /studentapi/${id}
Get a single item by the id.
Parameter | Type | Description |
---|---|---|
id |
integer |
Required. Id of item to fetch |
POST /studentapi/
Creates a new student.
PUT /studentapi/${id}
Update a single student by the id.
Parameter | Type | Description |
---|---|---|
id |
integer |
Required. Id of item to fetch |
PATCH /studentapi/${id}
Update a single partial student by the id.
Parameter | Type | Description |
---|---|---|
id |
integer |
Required. Id of item to fetch |
DELETE /studentapi/${id}
Delete a single student by the id.
Parameter | Type | Description |
---|---|---|
id |
integer |
Required. Id of item to fetch |