Skip to content

Latest commit

 

History

History
104 lines (91 loc) · 2.7 KB

seating.md

File metadata and controls

104 lines (91 loc) · 2.7 KB

Back to main

Seating

Add Chairs To Seating Arrangement
Remove Chairs From Seating Arrangement
Get Student From Chair


Endpoint: /Seating

Add Chairs To Seating Arrangement

Back to the top

POST

Example Request

{
    "body": {
        "class_id": 6,
        "arrangement": [
            {
                "x": 10,
                "y": 30,
                "student_id": 8
            }
        ]
    },
    "action": "add_chair_to_seating_arrangement"
}


Variable Data Type Required Additional Validation
class_id integer Yes No
arrangement array of objects Yes No

Object inside of arrangement

Variable Data Type Required Additional Validation
x integer Yes No
y integer Yes No
student_id integer Yes No


Expected Response:

Healthy Call

{
    "message": "Chairs added"
}

Unhealthy Call

{
    "error": "error message"
}

Remove Chairs From Seating Arrangement

Back to the top

DELETE

Example Request:
?chair_ids=[22]&action=remove_chairs_from_seating_arrangement

Variable Data Type Required Additional Validation
chair_ids array of integers True No


Expected Response:

Healthy Call

{
    "message": "Chairs Removed"
}

Unhealthy Call

{
    "error": "error message"
}

Get Student From Chair

Back to the top

GET

Example Request ?chair_id=19&action=get_student_from_chair


Variable Data Type Required Additional Validation
chair_id integer True No


Expected Response:

Healthy Call

{
    "message": "Student information pertaining to that chair"
}

Unhealthy Call

{
    "error": "error message"
}