Skip to content

Instantly share code, notes, and snippets.

@Quantisan
Last active February 10, 2022 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Quantisan/d3d20bbb0cb039737be95be8294b5fc5 to your computer and use it in GitHub Desktop.
Save Quantisan/d3d20bbb0cb039737be95be8294b5fc5 to your computer and use it in GitHub Desktop.
Burt API endpoints
# Motiva Burt is served over a Restful API with POST, PUT, GET, and DELETE endpoints as such:
# POST /api/experiment/ request body expectation
# campaignStart model that is expected for request body when creating a campaign
campaignStart = api.model(
"CampaignStart",
{
# Datetime string defining the current time
"now": fields.String(required=True),
# List of treatment ids
"treatmentIds": fields.List(fields.Integer, required=True),
},
)
# PUT /api/experiment/campaignID request body expectation
# campaignUpdate model that is expected for request body when updating a campaign
campaignUpdate = api.model(
"CampaignUpdate",
{
# Datetime string defining the current time. NOTE that this timestamp
# needs to be the same as the last call to GET etl-processor because
# this value is used to fetch the record
"now": fields.String(required=True),
# Boolean defining whether or not to prune treatments
"pruneTreatments": fields.Boolean(),
},
)
# GET /api/experiment/campaignID query params,
# campaignID timezone now number-of-treatments optimization-criterion confidence-threshold hard-commit?
#
# GET returns a list of tuples of the form
# [<treatment-id> <suggested_number_of_attemps_in_this_experiment>, ...]
# DELETE /api/experiment/campaignID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment