marktennyson / school_management

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple school management system with RestAPI

all apis endpoint:

The endpoint to get a particular student
GET /api/student/?id=1

and the response is:

{
    "id": 1,
    "name": "Aniket Sarkar",
    "standerd": "Ten",
    "roll_no": 56,
    "gender": "M",
    "dob": "2021-08-10",
    "created_at": "2021-08-14T09:35:55.239Z",
    "is_active": true
}
The endpoint to get all student data
GET /api/student/

and the response is:

[
    {
        "id": 1,
        "name": "Aniket Sarkar",
        "standerd": "Ten",
        "roll_no": 56,
        "gender": "M",
        "dob": "2021-08-10",
        "created_at": "2021-08-14T09:35:55.239Z",
        "is_active": true
    },
    {
        "id": 2,
        "name": "Aditi Singh",
        "standerd": "Ten",
        "roll_no": 1,
        "gender": "M",
        "dob": "2021-08-10",
        "created_at": "2021-08-14T09:36:59.692Z",
        "is_active": true
    }
]
To create a student
POST /api/student/

and the response is:

{
    "id": 1,
    "name": "Aniket Sarkar",
    "standerd": "Ten",
    "roll_no": 56,
    "gender": "M",
    "dob": "2021-08-10",
    "created_at": "2021-08-14T09:35:55.239Z",
    "is_active": true
}
to update a student
PUT /api/student/?id=1

and the response is:

{
    "id": 1,
    "name": "Aniket Sarkar",
    "standerd": "Twelve",
    "roll_no": 57,
    "gender": "M",
    "dob": "2021-08-10",
    "created_at": "2021-08-14T09:35:55.239Z",
    "is_active": true
}
to delete a student
DELETE /api/student/?id=1

and the response is:

204 - Content not found

About


Languages

Language:Python 100.0%