Skip to content

WEB MPC Server API

Vidya Akavoor edited this page Nov 12, 2021 · 1 revision

Below are the API routes exposed in the WEB-MPC server. Typically, a user should not need to access these endpoints manually. The tables below describe each endpoint and how it is used in the WEB-MPC process.

Session creation and query routes:

Route Description
/create_session
  • Creates a new computation session using the public key generated on the client-side and gives it a session ID and password
  • Initializes a JIFF computation for this session using the JIFFWrapper
/sessioninfo
  • must be authenticated with a user key
  • Gets the session info based on session ID and password
  • Only sends back the title and description fields
/get_cohorts
  • Gets the session info based on session ID and password
  • Only sends back the cohort_mapping field

Session status and history routes:

Route Description
/fetch_status
  • Gets the session status (one of ‘START’, ‘STOP’, or ‘PAUSE’) and sends back to client
/change_status
  • must be authenticated with a password
  • Sets the status to one of ‘START’, ‘STOP’, or ‘PAUSE’
  • If changing to ‘STOP’, starts the computation on the JIFF server side
/get_history
  • Gets the submission history
  • Only sends the most recent submission per participant

Routes to generate and query client urls / user keys / participation code

NOTE: All of the following routes must be authenticated with a password

Route Description
/add_cohort
  • Creates a new cohort name, no duplicates
  • Can only be called if the session is in ‘PAUSE’
/get_cohorts_manage
  • Same as /get_cohorts but with Analyst authentication via password
/generate_client_urls
  • Creates unique URLs for participants
  • Checks to make sure you do not exceed the max number of participants (configurable)
/get_client_urls
  • Gets all generated client URLs
Clone this wiki locally