API for Orthanc Config

41 views
Skip to first unread message

Dave

unread,
Jun 25, 2019, 2:13:35 PM6/25/19
to Orthanc Users
I've been searching through online resources and the Orthanc Book and don't see anywhere an API call that can be made to Orthanc that returns how the server is set up (ie, AET, port, TransferSyntaxes accepted etc: information configured in the orthanc.json file).  I appreciate that this may be a security concern, but if the API call was made from a known DICOM entity already (as in, it's listed in the DicomModalities) then would there be any harm? 

I think this would be really useful, as an external application could check the configured settings for the server before starting to send or query.


Thoughts?

Benoît Crickboom

unread,
Jun 25, 2019, 3:29:16 PM6/25/19
to Orthanc Users
Hi Dave,

/system route could partially fit your need:
~$ curl http://localhost:8044/system
{
   
"ApiVersion" : 2,
   
"DatabaseBackendPlugin" : "/usr/share/orthanc/plugins/libOrthancPostgreSQLIndex.so",
   
"DatabaseVersion" : 6,
   
"DicomAet" : "ORTHANC2",
   
"DicomPort" : 4242,
   
"HttpPort" : 8042,
   
"Name" : "",
   
"PluginsEnabled" : true,
   
"StorageAreaPlugin" : null,
   
"Version" : "1.5.6"
}


BTW, have you had a look on the "Reference of the REST API" link on that page : https://www.orthanc-server.com/static.php?page=documentation ? This could be useful.

Regards,

Dave

unread,
Jun 25, 2019, 6:53:29 PM6/25/19
to Orthanc Users
Absolutely - that certainly helps, thanks for the pointer.

Sébastien Jodogne

unread,
Jun 26, 2019, 1:49:12 AM6/26/19
to Orthanc Users
Hello,

The full Orthanc configuration is available to plugins using function "OrthancPluginGetConfiguration()":

As a consequence, you can create a plugin to fulfill your need:


On Tuesday, June 25, 2019 at 8:13:35 PM UTC+2, Dave wrote:
Reply all
Reply to author
Forward
0 new messages