ObjectiveFunctioni-server REST API
-
POST/api/create_study create a new study
- Request JSON Object
name (string) – the name of the study
parameters (list) – a list of parameters associated with study
- Response JSON Object
id (int) – study ID
name (string) – study name
app (string) – app name
num_scenarios (int) – the number of scenarios associated with this study
- Status Codes
400 Bad Request – when name or parameters is missing
409 Conflict – when study already exists
201 Created – study was successfully created
-
GET/api/studies get a list of all studies
- Response JSON Array of Objects
id (int) – study ID
name (string) – study name
app (string) – app name
num_scenarios (int) – the number of scenarios associated with this study
-
DELETE/api/studies/(string: name) -
GET/api/studies/(string: name)
get information about a particular stud
- Parameters
name (string) – name of the study
- Status Codes
404 Not Found – when the study does not exist
200 OK – the call successfully returned a json string
- Response JSON Object
id (int) – study ID
name (string) – study name
app (string) – app name
num_scenarios (int) – the number of scenarios associated with this study
-
DELETE/api/studies/(string: name)
delete a study
- Parameters
name (string) – name of the study
- Status Codes
404 Not Found – when the study does not exist
200 OK – the study was successfully deleted
-
-
GET/api/studies/(string: name) -
GET/api/studies/(string: name)
get information about a particular stud
- Parameters
name (string) – name of the study
- Status Codes
404 Not Found – when the study does not exist
200 OK – the call successfully returned a json string
- Response JSON Object
id (int) – study ID
name (string) – study name
app (string) – app name
num_scenarios (int) – the number of scenarios associated with this study
-
DELETE/api/studies/(string: name)
delete a study
- Parameters
name (string) – name of the study
- Status Codes
404 Not Found – when the study does not exist
200 OK – the study was successfully deleted
-
-
GET/api/studies/(string: name)/parameters get study parameters
- Parameters
name (string) – name of the study
- Status Codes
404 Not Found – when the study does not exist
200 OK – the call successfully returned a json string
-
POST/api/studies/(string: study)/create_scenario create a new scenario
- Parameters
name (string) – name of the study
- Request JSON Object
name (string) – the name of the scenario
runtype (string) – the type of scenrio, must be one of ‘MISFIT’, ‘PATH’
- Status Codes
400 Bad Request – when name or runtype is missing
404 Not Found – when the study does not exist
409 Conflict – when scenario already exists
201 Created – the scenario was successfully created
-
PUT/api/studies/(string: study)/observation_names get/set list of observation names of a study
- Parameters
study (string) – name of the study
- Status Codes
404 Not Found – when the study does not exist or the observation names do not match
200 OK – list of observation names
201 Created – observation names were successfully added
-
GET/api/studies/(string: study)/observation_names get/set list of observation names of a study
- Parameters
study (string) – name of the study
- Status Codes
404 Not Found – when the study does not exist or the observation names do not match
200 OK – list of observation names
201 Created – observation names were successfully added
-
GET/api/studies/(string: study)/scenarios get a list of all scenarios of a study
- Parameters
study (string) – name of the study
- Status Codes
404 Not Found – when the scenario does not exist
200 OK – studies
-
DELETE/api/studies/(string: study)/scenarios/(string: name) delate a scenario including all associated runs
- Parameters
study (string) – name of the study
name (string) – name of the scenario
- Status Codes
404 Not Found – when the scenario does not exist
200 OK – the call successfully deleted the scenario
-
POST/api/studies/(string: study)/scenarios/(string: name)/get_run get a run of a particular scenario
- Parameters
study (string) – name of the study
name (string) – name of the scenario
- Status Codes
400 Bad Request – when name or runtype is missing
404 Not Found – when the scenario does not exist
201 Created – the call successfully returned a json string
-
POST/api/studies/(string: study)/scenarios/(string: name)/lookup_run lookup a run of a particular scenario
- Parameters
study (string) – name of the study
name (string) – name of the scenario
- Status Codes
400 Bad Request – when name or runtype is missing
404 Not Found – when the scenario does not exist
201 Created – the call successfully returned a json string
-
GET/api/studies/(string: study)/scenarios/(string: name)/runs get all runs of a particular scenario
- Parameters
study (string) – name of the study
name (string) – name of the scenario
- Status Codes
404 Not Found – when the scenario does not exist
200 OK – the call successfully returned a json string
-
GET/api/studies/(string: study)/scenarios/(string: name)/runs/(int: runid) get run info by id
- Parameters
study (string) – name of the study
name (string) – name of the scenario
id (int) – the run ID
- Status Codes
404 Not Found – when the run does not exist
200 OK – json object containing run
-
PUT/api/studies/(string: study)/scenarios/(string: name)/runs/(int: runid)/state get/set run state
- Parameters
study (string) – name of the study
name (string) – name of the scenario
id (int) – the run ID
- Status Codes
404 Not Found – when the run does not exist
-
GET/api/studies/(string: study)/scenarios/(string: name)/runs/(int: runid)/state get/set run state
- Parameters
study (string) – name of the study
name (string) – name of the scenario
id (int) – the run ID
- Status Codes
404 Not Found – when the run does not exist
-
PUT/api/studies/(string: study)/scenarios/(string: name)/runs/(int: runid)/value get/set run value
- Parameters
study (string) – name of the study
name (string) – name of the scenario
id (int) – the run ID
- Status Codes
404 Not Found – when the run does not exist
-
GET/api/studies/(string: study)/scenarios/(string: name)/runs/(int: runid)/value get/set run value
- Parameters
study (string) – name of the study
name (string) – name of the scenario
id (int) – the run ID
- Status Codes
404 Not Found – when the run does not exist
-
POST/api/studies/(string: study)/scenarios/(string: name)/runs/with_state get run in a particular state
- Parameters
study (string) – name of the study
name (string) – name of the scenario
- Request JSON Object
state (string) – the state the run should be in
new_state (string) – optionally, the new state the run will move to
- Status Codes
400 Bad Request – when name or runtype is missing
404 Not Found – when the scenario does not exist
201 Created – the call successfully returned a json string
-
GET/api/token get the authentication token
- Response JSON Object
token (string) – the authentication token