Student API

Simple api using Django Rest Framework.

Authors

Deployment

To deploy this project run

  python manage.py runserver

Documentation

Documentation Project has three branches. Each branch represents a way to implement api in DRF.

Master

Here first function based api view been implemented then class based api view been implemented.

GenericAPIView

Api has been implenemted with GenericAPIView and ModelMixins.

ConcreteViewClass

Api has been implemented with ConcreteViewClass.

API Reference

Get all student

  GET /studentapi/

Get all student from the table.

Get student

  GET /studentapi/${id}

Get a single item by the id.

Parameter Type Description
id integer Required. Id of item to fetch

Create a new Student

  POST /studentapi/

Creates a new student.

Update student

  PUT /studentapi/${id}

Update a single student by the id.

Parameter Type Description
id integer Required. Id of item to fetch

Update partial student

  PATCH /studentapi/${id}

Update a single partial student by the id.

Parameter Type Description
id integer Required. Id of item to fetch

Delete Student

  DELETE /studentapi/${id}

Delete a single student by the id.

Parameter Type Description
id integer Required. Id of item to fetch