FORMAT: 1A
Authentication related endpoints
-
Request (application/json)
-
Body
{ "email": "foo", "password": "bar" }
-
-
Response 200 (application/json)
-
Body
{ "token": "token", "user": { "id": 4, "first_name": "Teacher", "last_name": "Doe", "email": "teacher@sms.com", "last_login": "2015-09-07 19:27:08", "address": "Address", "picture": "image.jpg", "mobile": "+545154515", "phone": "+545154515", "gender": 0, "birth_date": "2015-06-02", "birth_city": "Banja Luka" }, "role": "teacher" }
-
-
Response 401 (application/json)
-
Body
{ "error": "invalid_credentials" }
-
-
Response 500 (application/json)
-
Body
{ "error": "could_not_create_token" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "token": "token" }
-
-
Response 500 (application/json)
-
Body
{ "error": "could_not_create_token" }
-
General endpoints which can be accessed by any user group
Get all behaviors This list use teacher to put behavior to student
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "behaviors": [ { "id": "1", "title": "Good" }, { "id": "2", "title": "Worse" } ] }
-
Get all directions This is list of all directions of school mostly is for admin who create groups of students
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "directions": [ { "id": "1", "title": "Sociology", "duration": "3" }, { "id": "2", "title": "History", "duration": "4" } ] }
-
Get all dormitories Method for admin to list all dormitories in school
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
[ { "id": "1", "title": "Student hotel 1" }, { "id": "2", "title": "Student hotel 2" } ]
-
Get all dormitory rooms Method for admin to list all dormitory rooms in school
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "dormitories": [ { "id": "1", "dormitory": "Student hotel 1", "title": "Room 1" }, { "id": "2", "dormitory": "Student hotel 2", "title": "Room 1" } ] }
-
Get all dormitory beds Method for admin to list all dormitory beds and know which student is in which room in school
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "dormitories": [ { "id": "1", "dormitory": "Student hotel 1", "dormitory_room": "Room 1", "bed": "Bed 1" }, { "id": "2", "dormitory": "Student hotel 1", "dormitory_room": "Room 2", "bed": "Bed 2" } ] }
-
Get all mark types Teachers need this to choose which is mark type
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "mark_type": [ { "id": "1", "title": "Oral" }, { "id": "2", "title": "Writing" } ] }
-
Get all mark values Teachers need this to choose which is mark value
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "mark_values": [ { "id": "1", "title": "A" }, { "id": "2", "title": "B" } ] }
-
Get all notice types Teachers need this to choose which is notice type
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "notice_type": [ { "id": "1", "title": "Notice of oral" }, { "id": "2", "title": "Notice of writing test" } ] }
-
Get all notifications All users get all they notification
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "notifications": [ { "id": "1", "read": "0", "title": "Notification 1", "content": "This is content of notification", "date": "2015-10-12" } ] }
-
Get all sections Admin role to get all sections
-
Request (application/json)
-
Body
{ "token": "foo", "school_year": "1" }
-
-
Response 200 (application/json)
-
Body
{ "sections": [ { "id": "1", "title": "1 - 1", "section_teacher": "Teacher Name 1" }, { "id": "2", "title": "1 - 2", "section_teacher": "Teacher Name 2" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all semesters Admin list of all semesters
-
Request (application/json)
-
Body
{ "token": "foo", "school_year": "1" }
-
-
Response 200 (application/json)
-
Body
{ "semesters": [ { "id": "1", "title": "First semester", "start": "2015-06-12", "end": "2015-12-31" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all subjects for selected direction This used admin for select all subject for selected direction to can add teacher to subject on selected school year
-
Request (application/json)
-
Body
{ "token": "foo", "direction_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "subjects": [ { "id": "1", "title": "English", "class": "3", "order": "2" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
List all transportations used for all roles
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "transportation": [ { "id": "1", "title": "Go to school", "start": "7:00", "end": "7:30" } ] }
-
List all transportation directions for selected transportation used for all roles
-
Request (application/json)
-
Body
{ "token": "foo", "transportation": "1" }
-
-
Response 200 (application/json)
-
Body
{ "transportation_directions": [ { "id": "1", "name": "Direction name" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all messages used for all roles to get user messages
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
[ { "received": [ { "id": 1, "parent_message_id": null, "read": 0, "title": "This is title", "content": "This is message", "created_at": "2015-11-30 15:30:12" } ], "send": [ { "id": 2, "parent_message_id": 1, "read": 0, "title": "This is replay title", "content": "This is replay message", "created_at": "2015-11-30 15:33:05" } ] } ]
-
Send message to user or replay to message. If send parent_message_id greater then 0 than it's replay to message, if 0 then is new message
-
Request (application/json)
-
Body
{ "token": "foo", "user_id_receiver": "1", "parent_message_id": "1", "title": "This is title of message", "content": "This is content of message" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all users, all role can use it to send message
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "users": [ { "id": "1", "first_name": "First name", "last_name": "Last name" } ] }
-
Reserve book from user, all role can reseve book
-
Request (application/json)
-
Body
{ "token": "foo", "book_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all payments for user, student select there payment and parent select for there students sending user_id of that student
-
Request (application/json)
-
Body
{ "token": "foo", "user_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "payments": [ { "id": 1, "amount": "10.5", "title": "This is title of payment", "description": "This is description of payment", "created_at": "2015-06-05 10:55:11" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "user_id": "1", "school_year_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "student": [ { "student_id": "1", "section_id": "1", "section_name": "1-2", "order": "2" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "search": "Test book" }
-
-
Response 200 (application/json)
-
Body
{ "books": [ { "id": "1", "subject": "History", "subject_id": 3, "title": "History of world 1", "author": "Group of authors", "year": "2015", "internal": "2015/15", "publisher": "Book publisher", "version": "0.2", "issued": 2, "quantity": 2 }, { "id": "2", "subject": "English", "subject_id": 1, "title": "English 2", "author": "Group of authors", "year": "2015", "internal": "2015/15", "publisher": "Book publisher", "version": "0.2", "issued": 1, "quantity": 2 } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "search": "Test user" }
-
-
Response 200 (application/json)
-
Body
{ "users": [ { "id": "1", "name": "Name Surname" } ] }
-
Get all reserved books for user
-
Request (application/json)
-
Body
{ "token": "foo", "user_id": 5 }
-
-
Response 200 (application/json)
-
Body
{ "books": [ { "id": "1", "title": "Book for mathematics", "author": "Group of authors", "subject": "Mathematics", "reserved": "2015-08-10" } ] }
-
Get all borrowed books for user
-
Request (application/json)
-
Body
{ "token": "foo", "user_id": 5 }
-
-
Response 200 (application/json)
-
Body
{ "books": [ { "id": 12, "title": "EngLib", "author": "Ruth D. Brown", "subject": "English", "internal": "12-15", "get": "2015-09-11" }, { "id": 13, "title": "SciLib", "author": "Matthew D. Stewart", "subject": "Science", "internal": "158/59", "get": "2015-09-11" } ], "user": { "id": 15, "name": "Full Name", "email": "address@sms.com", "address": "Kincheloe Road Portland", "mobile": "345376587657", "phone": "", "gender": 1 } }
-
Get all books for subject
-
Request (application/json)
-
Body
{ "token": "foo", "subject_id": "5" }
-
-
Response 200 (application/json)
-
Body
{ "books": [ { "id": "1", "title": "Book for mathematics", "author": "Group of authors", "year": "2015", "internal": "15-14", "publisher": "Book publisher", "version": "0.2", "quantity": 2, "issued": 1 } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all Feedback for user
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "feedback": { "id": 1, "title": "This is title of notice", "type": "request", "description": "This is description of notice", "date": "2015-02-02 15:32:11" } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "feedback_type": "request|praise|contact|error|proposal", "role": "student\librarian|teacher|parent", "title": "This is title", "description": "This is description" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all transportation routes
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "transport": { "id": 1, "title": "This is title of notice", "start": "2015-02-02", "end": "", "locations": { "id": 1, "name": "San Jose", "lat": "", "lang": "" } } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Student endpoints, can be accessed only with role "student"
Get all school years with current school year name and id and other school years that he/she can select. This method use all roles because all data(students, sections, marks, behaviors,semesters,attendances) are depend on school year
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": 1, "school_year": 1 }
-
-
Response 200 (application/json)
-
Body
{ "current_school_value": "2014/2015", "current_school_id": 1, "other_school_years": { "id": 1, "title": "2014/2015" } }
-
Get timetable for student with getting his token and role student This method return array of array: first array has number of hour, first subarray is array for number of day and in that array have objects that represent subject and teacher that teaches
-
Request (application/json)
-
Body
{ "token": "foo", "school_year_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "timetable": { "1": { "1": { "id": 10, "subject": "English", "teacher": "Test teacher 1" }, "2": { "id": 11, "subject": "Serbian", "teacher": "Test teacher 2" } }, "2": { "1": { "id": 12, "subject": "History", "teacher": "Test teacher 2" }, "2": { "id": 13, "subject": "English", "teacher": "Test teacher 1" } } } }
-
Get timetable classes for student for selected school year and day (day: 1-Monday,... 7-Sunday)
-
Request (application/json)
-
Body
{ "token": "foo", "school_year_id": "1", "day_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "timetable": { "1": { "id": 10, "subject": "English", "teacher": "Test teacher 1" }, "2": { "id": 11, "subject": "Serbian", "teacher": "Test teacher 2" } } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get list of subjects and teachers for student
-
Request (application/json)
-
Body
{ "token": "foo", "school_year_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "subject_list": { "id": 4, "subject": "history", "teacher": "Teacher 1" }, "0": { "id": 1, "subject": "english", "teacher": "Teacher 2" } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all borrowed books
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "books": [ { "title": "Book for mathematics", "id": "12", "internal": "12-45", "author": "Group of authors", "get": "2015-08-10" } ] }
-
Get all attendances for student between two dates
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1", "start_date": "2015-10-12", "end_date": "2015-10-12" }
-
-
Response 200 (application/json)
-
Body
{ "attendance": { "2015-10-01": { "2": "yes", "3": "no" } } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all marks for student between two dates and subject
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1", "subject_id": "12", "start_date": "2015-10-12", "end_date": "2015-10-13" }
-
-
Response 200 (application/json)
-
Body
{ "marks": [ { "id": 1, "subject": "Subject Name", "mark_type": "Oral", "mark_value": "A+", "exam": "Exam 1", "date": "2015-06-10" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all exams for teacher group
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "exams": [ { "id": 1, "title": "This is title of exam", "subject": "English", "date": "2015-06-08" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all notices for teacher group
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "notice": [ { "id": 1, "title": "This is title of notice", "subject": "English", "description": "This is description of notice", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all diaries for student
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "diaries": [ { "id": 1, "title": "This is title of notice", "subject": "English", "description": "This is description of notice", "hour": "2", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all diaries for student and selected date
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1", "date": "2015-10-10" }
-
-
Response 200 (application/json)
-
Body
{ "diaries": [ { "id": 1, "title": "This is title of notice", "subject": "English", "description": "This is description of notice", "hour": "2", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get exams for subject and student
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1", "subject_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "exams": [ { "id": 1, "title": "This is title of exam", "subject": "English", "description": "This is description of exam", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get exams for student group
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "exams": [ { "id": 1, "title": "This is title of exam", "subject": "English", "description": "This is description of exam", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get subject list for student
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "subjects": { "id": 1, "subject": "English", "teacher": "Test Teacher", "image": "" } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "exams": [ { "id": 1, "title": "This is title of exam", "subject": "English", "date": "2015-02-02", "total_marks": "5" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "exam_id": "1", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "marks": [ { "id": 1, "title": "This is title of exam", "description": "This is description of exam", "subject": "English", "date": "2015-02-02", "marks": [ { "id": "105", "mark_value": "F", "mark_type": "gk" } ] } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get last school year and student_id for student user [GET /student/school_year_student]
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "school_year_id": 1, "school_year": "2015-2016", "student_id": "1" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Parent endpoints, can be accessed only with role "parent"
Get all school years with current school year name and id and other school years that he/she can select. This method use all roles because all data(students, sections, marks, behaviors,semesters,attendances) are depend on school year
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": 1, "school_year": 1 }
-
-
Response 200 (application/json)
-
Body
{ "current_school_value": "2014/2015", "current_school_id": 1, "other_school_years": { "id": 1, "title": "2014/2015" } }
-
Get timetable for student with getting his token and role student This method return array of array: first array has number of hour, first subarray is array for number of day and in that array have objects that represent subject and teacher that teaches
-
Request (application/json)
-
Body
{ "token": "foo", "student_user_id": "5", "school_year": "1" }
-
-
Response 200 (application/json)
-
Body
{ "timetable": { "1": { "1": { "id": 10, "subject": "English", "teacher": "Test teacher 1" }, "2": { "id": 11, "subject": "Serbian", "teacher": "Test teacher 2" } }, "2": { "1": { "id": 12, "subject": "History", "teacher": "Test teacher 2" }, "2": { "id": 13, "subject": "English", "teacher": "Test teacher 1" } } } }
-
Get timetable classes for parent for selected student, school year and day (day: 1-Monday,... 7-Sunday)
-
Request (application/json)
-
Body
{ "token": "foo", "school_year_id": "1", "student_user_id": "1", "day_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "timetable": { "1": { "id": 10, "subject": "English", "teacher": "Test teacher 1" }, "2": { "id": 11, "subject": "Serbian", "teacher": "Test teacher 2" } } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get list of subjects and teachers for student
-
Request (application/json)
-
Body
{ "token": "foo", "school_year_id": "1", "student_user_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "subject_list": { "id": 4, "subject": "history", "teacher": "Teacher 1" }, "0": { "id": 1, "subject": "english", "teacher": "Teacher 2" } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all borrowed books
-
Request (application/json)
-
Body
{ "token": "foo", "student_user_id": "5" }
-
-
Response 200 (application/json)
-
Body
{ "borrowed_books": { "title": "Book for mathematics", "author": "Group of authors", "id": "12", "internal": "12-45", "get": "2015-08-10" }, "0": { "statusCode": 500, "contentType": "application/json", "body": { "error": "not_valid_data" }, "headers": [] } }
-
Get all attendances for student between two dates
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1", "start_date": "2015-10-12", "end_date": "2015-10-12" }
-
-
Response 200 (application/json)
-
Body
{ "attendance": { "2015-10-01": { "2": "yes", "3": "no" } } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all marks for student between two dates and subject
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1", "subject_id": "12", "start_date": "2015-10-12", "end_date": "2015-10-13" }
-
-
Response 200 (application/json)
-
Body
{ "marks": [ { "id": 1, "subject": "Subject Name", "mark_type": "Oral", "mark_value": "A+", "exam": "Exam 1", "date": "2015-06-10" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all invoices for user
-
Request (application/json)
-
Body
{ "token": "foo", "student_user_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "invoices": { "id": 1, "amount": "10.5", "title": "This is title of invoices", "description": "This is description of invoices" } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all children for parent
-
Request (application/json)
-
Body
{ "token": "foo", "user_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "children": { "student_name": "Student Name", "student_user_id": "1" } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all exams for student
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "exams": [ { "id": 1, "title": "This is title of exam", "subject": "English", "date": "2015-06-08" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all notices for student
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "notice": [ { "id": 1, "title": "This is title of notice", "subject": "English", "description": "This is description of notice", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all diaries for student
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "diaries": [ { "id": 1, "title": "This is title of notice", "subject": "English", "description": "This is description of notice", "hour": "2", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all diaries for student and selected date
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1", "date": "2015-10-10" }
-
-
Response 200 (application/json)
-
Body
{ "diaries": [ { "id": 1, "title": "This is title of notice", "subject": "English", "description": "This is description of notice", "hour": "2", "date": "2015-10-10" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get exams for subject and student
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1", "subject_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "exams": [ { "id": 1, "title": "This is title of exam", "subject": "English", "description": "This is description of exam", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get exams for student group
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "exams": [ { "id": 1, "title": "This is title of exam", "subject": "English", "description": "This is description of exam", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get student id for user and school year
-
Request (application/json)
-
Body
{ "token": "foo", "user_id": "1", "school_year_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "student_id": "1" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "exams": [ { "id": 1, "title": "This is title of exam", "subject": "English", "date": "2015-02-02", "total_marks": "5" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "exam_id": "1", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "marks": [ { "id": 1, "title": "This is title of exam", "description": "This is description of exam", "subject": "English", "date": "2015-02-02", "marks": [ { "id": "105", "mark_value": "F", "mark_type": "gk" } ] } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "applying_leave": [ { "id": 1, "title": "This is title of exam", "description": "This is description of exam", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1", "title": "This is title", "date": "2015-06-08", "description": "This is description" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "applying_leave_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
(paid=1-payed , 0-not payed) [GET /parent/fee_details]
-
Request (application/json)
-
Body
{ "token": "foo", "student_user_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "fee_details": { "student_name": "Student Name", "terms": [ { "id": "5", "title": "fee", "paid": "1", "amount": "200.00", "date": "2015-09-11 06:25:49" }, { "id": "6", "title": "John Mid-Term", "paid": "0", "amount": "200.00", "date": "2015-09-16 10:03:20" } ], "total_fee": "400.00", "paid_fee": "300.00", "balance_fee": "100.00" } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get last school year and last child which added [GET /parent/school_year_child]
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "school_year_id": 1, "school_year": "2015-2016", "student_id": "1", "student_user_id": "1", "student_name": "Student Name" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Teacher endpoints, can be accessed only with role "teacher"
Get all school years with current school year name and id and other school years that he/she can select. This method use all roles because all data(students, sections, marks, behaviors,semesters,attendances) are depend on school year
-
Request (application/json)
-
Body
{ "token": "foo", "school_year": 1 }
-
-
Response 200 (application/json)
-
Body
{ "current_school_value": "2014/2015", "current_school_id": 1, "other_school_years": { "id": 1, "title": "2014/2015" } }
-
Get timetable for teacher with getting his token and role teacher This method return array of array: first array has number of hour, first subarray is array for number of day and in that array have objects that represent subject and teacher that teaches. After first array goes second array that represents subjects and group that teacher teach in selected school year.
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "school_year_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "timetable": { "1": { "1": { "id": 10, "subject": "english", "group": "1 - 2" }, "2": { "id": 11, "subject": "serbian", "group": "2 - 2" } }, "2": { "1": { "id": 12, "subject": "history", "group": "1 - 3" }, "2": { "id": 13, "subject": "english", "group": "1 - 2" } } }, "subject_group": [ { "id": 4, "subject": "history", "group": "1 - 3" }, { "id": 1, "subject": "english", "group": "1 - 3" } ] }
-
Get timetable for teacher with getting selected group id This method return array of array: first array has number of hour, first subarray is array for number of day and in that array have objects that represent subject and teacher that teaches. After first array goes second array that represents subjects and group that teacher teach in selected group.
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "timetable": { "1": { "1": { "id": 10, "subject": "english", "group": "1 - 2" }, "2": { "id": 11, "subject": "serbian", "group": "2 - 2" } }, "2": { "1": { "id": 12, "subject": "history", "group": "1 - 3" }, "2": { "id": 13, "subject": "english", "group": "1 - 2" } } }, "subject_group": [ { "id": 4, "subject": "history", "group": "1 - 3" }, { "id": 1, "subject": "english", "group": "1 - 3" } ] }
-
Get timetable classes for teacher for selected day and school year.(1-Monday,... 7-Sunday)
-
Request (application/json)
-
Body
{ "token": "foo", "school_year_id": "1", "day_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "timetable": { "1": { "id": 10, "subject": "english", "group": "1 - 2" }, "2": { "id": 11, "subject": "serbian", "group": "2 - 2" } } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get timetable classes for teacher for selected group, day and school year.(day: 1-Monday,... 7-Sunday)
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "day_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "timetable": { "1": { "id": 10, "subject": "english", "group": "1 - 2" }, "2": { "id": 11, "subject": "serbian", "group": "2 - 2" } } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get subject list for teacher for school year
-
Request (application/json)
-
Body
{ "token": "foo", "school_year_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "subject_list": { "id": 4, "subject": "history", "group": "1 - 3" }, "0": { "id": 1, "subject": "english", "group": "1 - 3" } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get subject list for teacher for student group
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "subject_list": { "id": 4, "subject": "history", "group": "1 - 3" }, "0": { "id": 1, "subject": "english", "group": "1 - 3" } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all groups for teacher for selected school year
-
Request (application/json)
-
Body
{ "token": "foo", "school_year": "1" }
-
-
Response 200 (application/json)
-
Body
{ "student_groups": [ { "id": 1, "title": "Group 1", "direction": "English", "class": 2 } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all notices for teacher group
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "date": "2015-10-10" }
-
-
Response 200 (application/json)
-
Body
{ "notice": [ { "id": 1, "title": "This is title of notice", "notice_type_id": "1", "subject_id": "1", "subject": "English", "notice_type": "Exam", "description": "This is description of notice", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "notice_type_id": "1", "subject_id": "1", "title": "This is title", "date": "2015-06-08", "description": "This is description" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "notice_id": "1", "subject_id": "1", "title": "This is title", "date": "2015-06-08", "notice_type_id": "1", "description": "This is description" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "notice_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all exams for teacher group
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "date": "2015-10-10" }
-
-
Response 200 (application/json)
-
Body
{ "exams": [ { "id": 1, "title": "This is title of exam", "subject": "English", "subject_id": "1", "date": "2015-10-10", "description": "This is a description" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "subject_id": "1", "title": "This is title", "date": "2015-06-08" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "exam_id": "1", "subject_id": "1", "title": "This is title", "date": "2015-06-08", "description": "This is description" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "exam_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all attendances for teacher group between two date
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "start_date": "2015-10-12", "end_date": "2015-10-12" }
-
-
Response 200 (application/json)
-
Body
{ "attendance": [ { "id": 1, "student": "Student Name", "hour": "2", "justified": "yes", "date": "2015-06-05" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all attendances for teacher group by date
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "date": "2015-10-12" }
-
-
Response 200 (application/json)
-
Body
{ "attendance": [ { "id": 1, "student": "Student Name", "student_id": "1", "hour": "2", "justified": "yes", "date": "2015-06-05" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all attendances list of hours from timetable for selected date and group
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "date": "2015-10-12" }
-
-
Response 200 (application/json)
-
Body
{ "hour_list": [ { "id": 1, "hour": "1", "subject_id": "1", "subject": "english" }, { "id": 2, "hour": "2", "subject_id": "1", "subject": "history" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "student_id": "1", "date": "2015-06-08", "hour": "2", "student_group_id": "1", "justified": "yes" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "attendance_id": "1", "date": "2015-06-08", "hour": "1", "student_id": "1", "justified": "yes" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "attendance_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "attendance_id": "1", "justify": "no/yes/unknown" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all marks for teacher group between two date
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "subject_id": "1", "start_date": "2015-10-12", "end_date": "2015-10-13" }
-
-
Response 200 (application/json)
-
Body
{ "marks": [ { "id": 1, "student_name": "Student Name", "student_id": "1", "mark_type": "Oral", "mark_type_id": "1", "mark_value": "A+", "mark_value_id": "1", "exam": "Exam 1", "exam_id": "1" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all marks for teacher group for selected date
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "date": "2015-10-12" }
-
-
Response 200 (application/json)
-
Body
{ "marks": [ { "id": 1, "student_name": "Student Name", "student_id": "1", "subject": "Subject", "subject_id": "1", "mark_type": "Oral", "mark_type_id": "1", "mark_value": "A+", "mark_value_id": "1", "exam": "Exam 1", "exam_id": "1", "date": "2015-10-12" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "exam_id": "1", "mark_type_id": "1", "student_id": 1, "subject_id": "1", "mark_value_id": "1", "date": "2015-06-08", "student_group_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "mark_id": "1", "date": "2015-06-08", "exam_id": "1", "student_id": "1", "mark_type_id": "1", "subject_id": "1", "mark_value_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "mark_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all students for teacher group
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "students": [ { "id": 1, "student_name": "Student Name" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all borrowed books
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "books": [ { "user_book_id": "1", "title": "Book for mathematics", "author": "Group of authors", "get": "2015-08-10" } ] }
-
Get all diaries for student
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "diaries": [ { "id": 1, "title": "This is title of notice", "subject": "English", "description": "This is description of notice", "hour": "2", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all diaries for student group and selected date
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "date": "2015-10-10" }
-
-
Response 200 (application/json)
-
Body
{ "diaries": [ { "id": 1, "title": "This is title of notice", "subject_id": 12, "subject": "English", "description": "This is description of notice", "hour": "2", "date": "2015-02-02" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "group_id": "1", "subject_id": "1", "title": "This is title", "date": "2015-06-08", "hour": "1", "description": "This is description" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "diary_id": "1", "subject_id": "1", "title": "This is title", "date": "2015-06-08", "hour": "1", "description": "This is description" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "diary_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "exams": [ { "id": 1, "title": "This is title of exam", "subject": "English", "date": "2015-02-02", "total_marks": "5" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "subject_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "exams": [ { "id": 1, "title": "English", "date": "2015-10-10" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "exam_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "marks": [ { "id": 1, "title": "This is title of exam", "description": "This is description of exam", "subject": "English", "date": "2015-02-02", "marks": [ { "id": "105", "mark_value": "F", "mark_type": "gk" } ] } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "date": "2015-10-10" }
-
-
Response 200 (application/json)
-
Body
{ "applying_leave": [ { "id": 1, "title": "This is title of exam", "description": "This is description of exam", "date": "2015-10-10", "student_name": "Student Name" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get last school year and group where teacher teach some subject [GET /teacher/school_year_group]
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "school_year_id": 1, "school_year": "2015-2016", "group_id": "1", "group": "1-2" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all subject for teacher for selected student group
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "subjects": [ { "id": 1, "title": "English" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all hours for selected student group and date
-
Request (application/json)
-
Body
{ "token": "foo", "student_group_id": "1", "date": "2015-10-10", "subject_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "hours": [ { "id": "1", "hour": "2" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Librarian endpoints, can be accessed only with role "librarian"
Get all school years with current school year name and id and other school years that he/she can select. This method use all roles because all data(students, sections, marks, behaviors,semesters,attendances) are depend on school year
-
Request (application/json)
-
Body
{ "token": "foo", "school_year": 1 }
-
-
Response 200 (application/json)
-
Body
{ "current_school_value": "2014/2015", "current_school_id": 1, "other_school_years": { "id": 1, "title": "2014/2015" } }
-
Get all borrowed books
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "books": [ { "user_book_id": "1", "title": "Book for mathematics", "author": "Group of authors", "get": "2015-08-10" } ] }
-
-
Request (application/json)
-
Body
{ "token": "foo", "subject_id": "1", "title": "Title of book", "author": "This is author", "year": "2015", "quantity": "5", "internal": "2015/15", "publisher": "Book publisher 2", "version": "0.1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "book_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "book_id": "1", "subject_id": "1", "title": "Title of book", "author": "This is author", "year": "2015", "quantity": "5", "internal": "2015/15", "publisher": "Book publisher 2", "version": "0.1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get all reserved books
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "books": { "id": "1", "title": "Book for mathematics", "author": "Group of authors", "subject": "Mathematics", "reserved": "2015-08-10" } }
-
-
Request (application/json)
-
Body
{ "token": "foo", "user_book_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "user_book_id": "1", "get": "2015-06-08" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "book_id": "1", "user_id": "1", "note": "This is note", "date": "2015-02-02" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "user_book_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Get list of subjects for all directions and class use for creating book
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "subjects": [ { "id": "1", "title": "Direction2 (3) English", "direction": "Direction2", "class": "3", "subject": "English" } ] }
-
Get list of users for issuing book
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "users": [ { "id": "1", "name": "First Last name", "role": "teacher|librarian|admin|student|parent" } ] }
-