Skip to content
Vidya Akavoor edited this page Aug 25, 2021 · 11 revisions

Chamberlain is a server responsible for sending requests to initiate Congregation workflows. It has a database and few end points to interact with the database. Look at the Chamberlain API for more.

To get started with chamberlain, first you will need to host and populate the database you will be using. See the instructions at Hosting and Populating the Database to do that.

Once your database is ready, you will need to edit an environment file with the location and credentials of your database for chamberlain to use.

  1. Create a file called .env in the top level directory of the chamberlain repo if you do not already have one.
  2. Enter the following lines into the file:
MYSQL_HOST= "{endpoint}"
MYSQL_PORT= {port}
MYSQL_USER= "{username}"
MYSQL_PASSWORD= "{password}"
MYSQL_DB= "{database name}"

Now you are ready to run chamberlain. Currently, chamberlain is being run locally for testing - it has not yet been deployed anywhere. You can run the server locally by running python wsgi.py in the terminal, after navigating to the top level directory of the chamberlain repo.

To submit a workflow, send the following POST request to the endpoint below to your chamberlain server:

endpoint: /api/submit

request payload:

{
    "party_count": {number of parties},
    "party_list": [{list of party IDs}],
    "dataset_id": "{datasetId to run workflow over}",
    "operation": "{operation to run (e.g. "sum")}"
}
Clone this wiki locally