Skip to content

JLM Server requests

GreatWizard edited this page May 2, 2012 · 24 revisions

Definition of the JLM Server different requests, sent in JSON

StudentServlet (/student)

The user executed an exercise:

  1. Demand
  • action = executed
  • username = username
  • course = course id
  • exoname = exo name
  • exolang = exo language
  • passedtests = number of passed tests
  • totaltests = total number of tests
  1. Response
  • true/false

The user launched JLM:

  1. Demand
  • action = join
  • username = username => Response : true/false

The user is still working in JLM (every 60 seconds):

  1. Demand
  • action = heartbeat
  • username = username => Response : true/false

The user exited JLM:

  1. Demand
  • action = leave
  • username = username => Response : true/false

The user changed of exercise:

  1. Demand
  • action = switch
  • username = username
  • course = course id
  • exoname = exo name
  • exolang = exo language => Response : true/false

CourseServlet (/course)

Get all courses ids:

  1. Demand
  • action = allids => Response : Array String = ids

AlertServlet (/alert)

  1. Demand //TODO
  2. Response //TODO

TeacherServlet (/teacher)

Create a new course:

  1. Demand
  • action = new
  • course = course id
  • password = course password (for the students)
  • teacher_password = course teacher password (to administrate courses)
  1. Response
  • true/false

Download updated courses data:

  1. Demand
  • action = refresh
  1. Response
  • Array 1 String =
  • Array 2 String =
  • Array 3 String =
  • Array 4 String =

Delete a course:

  1. Demand
  • action = remove
  • course = course id
  • password = teacher password
  1. Response
  • true/false
Clone this wiki locally