GetOrthancConfiguration() and default config

Hi,

in Orthanc Book it is said :

However, we recommend that you start from an empty configuration file and only specify the options for which you don’t wan’t to use the default value.

but in this case, the LUA function GetOrthancConfiguration() only returns these options, and not the default ones !

It would be very usefull if the function returned all the Orthanc configuration keys, with the default values for the keys not found in config files.

Thanks,
Marc

Hello,

You can retrieve the default configuration by executing “./Orthanc --config=DefaultConfiguration.json” at the command line:
https://book.orthanc-server.com/users/configuration.html

Store this file somewhere on the hard disk, then read it using Lua and parse it using the function “ParseJson()” provided by Orthanc:
https://www.lua.org/pil/21.2.html

https://book.orthanc-server.com/users/lua.html

You could as well download the default configuration file from Internet using the “HttpGet()” Lua function provided by Orthanc:
https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Configuration.json

HTH,
Sébastien-