ObjectiveFunctioni-server REST API

Resource

Operation

Description

create_study

POST /api/create_study

create a new study

runs

POST /api/studies/(string:study)/scenarios/(string:name)/runs/with_state

get run in particular state

PUT /api/studies/(string:study)/scenarios/(string:name)/runs/(int:runid)/state

get/set run state

GET /api/studies/(string:study)/scenarios/(string:name)/runs/(int:runid)/state

PUT /api/studies/(string:study)/scenarios/(string:name)/runs/(int:runid)/value

get/set run value

GET /api/studies/(string:study)/scenarios/(string:name)/runs/(int:runid)/value

GET /api/studies/(string:study)/scenarios/(string:name)/runs/(int:runid)

get run by ID

scenarios

POST /api/studies/(string:study)/scenarios/(string:name)/lookup_run

lookup run

POST /api/studies/(string:study)/scenarios/(string:name)/get_run

get information about a particular run

GET /api/studies/(string:study)/scenarios/(string:name)/runs

get information about a particular scenario

DELETE /api/studies/(string:study)/scenarios/(string:name)

delete scenario

studies

GET /api/studies

get a list of all studies

PUT /api/studies/(string:study)/observation_names

get/set list of observation names of a study

GET /api/studies/(string:study)/observation_names

POST /api/studies/(string:study)/create_scenario

create a new scenario for study

GET /api/studies/(string:name)/parameters

get study parameters

GET /api/studies/(string:study)/scenarios

get a list of all studies

DELETE /api/studies/(string:name)

get study

GET /api/studies/(string:name)

token

GET /api/token

get the authentication token

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
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
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
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
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
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
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
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
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
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
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
GET /api/token

get the authentication token

Response JSON Object
  • token (string) – the authentication token