-
Notifications
You must be signed in to change notification settings - Fork 0
API Calls
Mayukha Vadari edited this page Jul 5, 2020
·
1 revision
-
GET
only - Permissions: logged in
- Parameters: None
- Returns information about logged-in user (currently
username
,is_student
,is_teacher
)
-
POST
only - Permissions: None
- Body:
username
,password
- Used to log in, returns access + refresh tokens for the user if successful
-
GET
only - Permissions: None
- Body:
refresh
(refresh token) - Returns new access + refresh tokens for the user (refresh token is the same if
ROTATION=False
in settings.py)
-
POST
only - Permissions: None
- Body: ESPUser and StudentProfile details
- If successful, returns access + refresh tokens (errors aren't being handled yet)
-
GET
: get student profile info -
POST
: update student profile info
-
GET
only - Permissions: logged in,
is_student
- Parameters: None
- Returns json (sorted by
"name"
) of the form
{"current": [{"name": "HSSP 1957", "url": "HSSP/1957", "registered", /*whether the student has begun registration for the program*/}],
"previous": ["{"name": "HSSP 1957", "url": "HSSP/1957"}]
}
Current programs are ones with open or ongoing registration, and previous programs are ones that the student has registered for in the past.
-
GET
only - Permissions: logged in,
is_student
- Parameters: None
- Returns sorted list of programs that have open teacher registration
- Will be replaced by something analogous to
api/studentdashboard
All of these URLs are prepended with /api/[program]/[edition]/
(and eventually will also have the option of /api/[program]/[season]/[edition]/
-
GET
only - Permissions: logged in,
is_student
, registered for the program - Parameters: None
- Returns a JSON of all the data in the current user's
StudentRegistration
object
- Permissions: logged in,
is_student
, registered for the program -
GET
: no params, returns the emergency info of the student -
POST
: update the emergency info of the student
- Permissions: logged in,
is_student
, registered for the program -
GET
: no params, returns the medliab status of the student -
POST
: update the medliab status of the student
- Permissions: logged in,
is_student
, registered for the program -
GET
: no params, returns the liability wiaver status of the student -
POST
: update the liability waiver status of the student
- Permissions: logged in,
is_student
, registered for the program -
GET
: no params, returns the availability of the student -
POST
: update the availability of the student