Skip to content

Endpoints

Males Sebastian edited this page May 28, 2017 · 7 revisions

Kunto Api Endpoints

Create user

Link: /users/create/

Method: POST

JSON contains: username, first_name, last_name, password, days(initialize with "[]")

Generate session token

Link: /api-token-auth/

Method: POST

JSON contains: username, password

Refresh token(while it's still available)

Link: /api-token-refresh/

Method: POST

JSON contains: token

Every upcoming endpoint needs in header the following:

Authorization: JWT <your_token>

Get current session user

Link: getuser/

Method:GET

JSON contains: nothing

Retrieve user details

Link: users/id

Method: GET

JSON contains: nothing

Create day model

Link: day/create

Method: POST

JSON contains: coefficient, good_standing_time, bad_standing_time, total_time, done_training

List all day models of current user

Link: day/create

Method: GET

JSON contains: nothing

Retrieve specific day

Link: day/id

Method: GET

JSON contains: nothing

Create exercise model

Link: exercise/create

Method: POST

JSON contains: owner, time

Get exercise model

Link: execise/id

Method: GET

JSON contains: nothing

Create state model

Link: state/create

Method: POST

JSON contains: exercise_id, sensor_input_one, sensor_input_two