School distedu
GET
/teacher/groups
GET
/teacher/subjects
POST
/login
Request parameters
email
string
email
required
password
string
password
required
Min length:
8
Responses
200
OK
GET
/profile
Request headers
authorization
token
required
JWT token
Responses
200
OK
Body
Object
email
string
Example:
vladd5@gmail.com
permission
Email of a pupil/teacher
string
Email of a pupil/teacher
Methods:
subject
Example 1
4930uhf0i34hf0h30
Example 1
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
string
Enumeration:
pupil
admin
Methods:
profile
GET
/subject
GET
/subject
Request headers
token
token
required
Request body
Object
subjectId
string
Id of a subject Math
Example:
fjodof4i34j3vfklldk
classId
string
Id of a class 1-A
Example:
hvforheif44j3vj430vj
Responses
200
OK
Body
Object
teacher
Object
Teacher of a subject
Example:
{ Teacher: {id: `ifn483odnf6odnio, name: `Natalia Petrovna`}}
email
Email of a teacher
name
string
Name of a teacher
Example:
Natalia Petrovna
Pupils
Array
Array of pupils of a given subject
Object
email
Email of a pupil
name
string
Name of a pupil
Example:
Vasya Petrov
Group
number
Pupil`s group within a subject
Example:
1
Object
Example:
{
"message": "invalid username or password",
"code": 400,
"params": {
"name": "username",
"value": "not found"
}
}
message
string
Example:
invalid username or password
code
integer
Example:
400
params
Object
name
string
Example:
username
value
string
Example:
not found
Responses:
Bad Request
Example 1
{"code":404,"message":"invalid username or password","params":[{"name":"username","value":"not found"}]}