School API
What is it?
A REST API implementing CRUD operations for a school entity with students.
The Latest Version
This API is currently at Version 1.0 (the first version).
Installation
Clone the repo
https://github.com/alexkiura/school_api.git
Navigate to the root folder
cd school_api
Install the necessary packages
pip install -r requirements.txt
Perform migrations
python manage.py makemigrations
python manage.py migrate
Testing
To run the tests for the API
python manage.py test
REST API
School API has a RESTful Application Program Interface (API)
School API's resources
The API resources are accessible at localhost:8000/api/v1/. They include:
Resource URL | Methods | Description |
---|---|---|
/api/v1/ |
GET | The index |
/api/v1/schools/ |
GET, POST | Schools |
/api/v1/schools/<id>/ |
GET, PUT, DELETE | A single school |
/api/v1/students/ |
GET, POST | Students |
/api/v1/students/<id>/ |
GET, PUT, DELETE | A single student |
Method | Description |
---|---|
GET | Retrieves a resource(s) |
POST | Creates a new resource |
PUT | Updates an existing resource |
DELETE | Deletes an existing resource |
Built with
Django | Django REST |