Skip to content

APIs - programming interfaces

The complete C++, Python, JSON-RPC and JavaScript interfaces to midas, covering every function and option. For an introduction to writing programs, start with Hello world.

Status codes

Most functions in midas return an integer status code, and the same codes are used in every language:

  • C++: functions return the code, and 1 means success (SUCCESS, CM_SUCCESS, DB_SUCCESS etc.). See Status and error codes for the full list
  • Python: codes that mean an error are turned into exceptions, derived from midas.MidasError. The codes are listed in midas.status_codes
  • JSON-RPC: the codes are in the status part of the reply (rpc.result.status in JavaScript)

For the data types used in the ODB and in data banks, see Data types.