Skip to content

Latest commit

 

History

History
329 lines (239 loc) · 10.3 KB

web_api.rst

File metadata and controls

329 lines (239 loc) · 10.3 KB

The Oríon Web API is a RESTful service that provides a way to retrieve and visualize information about your experiments and trials.

The API requests are handled by the Oríon itself. The REST server is started by the command line $ orion serve. The service is hosted through a gunicorn container. The database and host details are configured through the option --config <file>. Storage options are expressed in the configuration file in the same fashion as for other commands. Gunicorn options are specified under the top-level node gunicorn. An example is included below:

storage:
   database:
      host: 'database.pkl'
      type: 'pickleddb'

gunicorn:
   bind: '127.0.0.1:8000'
   workers: 4
   threads: 2

Authentication

No authentication is necessary at the moment to use the API.

Runtime

The runtime resource represents the runtime information for the API server.

Experiments

The experiment resource permits the retrieval of in-progress and completed experiments. You can retrieve individual experiments as well as a list of all your experiments.

Trials

The trials resource permits the retrieval of your trials regardless of their status. You can retrieve individual trials as well as a list of all your trials per experiment.

Plots

The plot resource permits the generation and retrieval of Plotly plots to visualize your experiments and their results.

Errors

Oríon uses conventional HTTP response codes to indicate the success or failure of an API request. In general, 2xx result codes indicate success where 4xx indicate an error that failed given the information provided such as an unknown resource or invalid parameters. 5xx codes indicate a server side error.

HTTP Codes Summary
200 OK The request succeeded
400 Bad Request Missing or invalid parameter
404 Not Found Resource unavailable or non-existent
500 Server Error Internal server error
Response JSON Object
  • title (string) - The type of error. Can be one of Experiment not found, Invalid parameter, and Trial not found.
  • description (string) - The human-readable description of the error.