comparison Sphinx/source/users/rest.rst @ 212:7ff807cc5ade

added modalities configuration
author amazy
date Fri, 22 Feb 2019 10:02:23 +0100
parents 66295dffbf33
children dcf6c2e60448
comparison
equal deleted inserted replaced
207:66295dffbf33 212:7ff807cc5ade
388 <configuration>`. For instance, here is how to declare a remote 388 <configuration>`. For instance, here is how to declare a remote
389 modality:: 389 modality::
390 390
391 ... 391 ...
392 "DicomModalities" : { 392 "DicomModalities" : {
393 "sample" : [ "STORESCP", "127.0.0.1", 2000 ] 393 "sample" : [ "ORTHANCA", "127.0.0.1", 2000 ], // short version
394 "sample2" : { // long version
395 "AET" : "ORTHANCB",
396 "Port" : 2001,
397 "Host" : "127.0.0.1",
398 "Manufacturer" : "Generic",
399 "AllowEcho" : true,
400 "AllowFind" : true,
401 "AllowMove" : true,
402 "AllowStore" : true
403 }
394 }, 404 },
395 ... 405 ...
396 406
397 .. highlight:: bash 407 .. highlight:: bash
398 408
399 Such a configuration would enable Orthanc to connect to another DICOM 409 Such a configuration would enable Orthanc to connect to two DICOM
400 store (for instance, another Orthanc instance) that listens on the 410 stores (for instance, other Orthanc instances) that listens on the
401 localhost on the port 2000. The modalities that are known to Orthanc 411 localhost on the port 2000 & 2001. The modalities that are known to Orthanc
402 can be queried:: 412 can be queried::
403 413
404 $ curl http://localhost:8042/modalities 414 $ curl http://localhost:8042/modalities?expand
405 415
416 The modalities can then be updated through the API too::
417
418 $ curl -v -X PUT http://localhost:8042/modalities/sample -d '{"AET" : "ORTHANCC", "Host": "127.0.0.1", "Port": 2002}'
419
420
421 Note that, by default, modalities are stored in Orthanc configuration files
422 and are updated in Orthanc memory only. If you want your modifications
423 to be persistent, you should configure Orthanc to store its modalities
424 in the database. This is done through this configuration::
425
426 ...
427 "DicomModalitiesInDatabase" : true,
428 ...
406 429
407 Sending One Resource 430 Sending One Resource
408 ^^^^^^^^^^^^^^^^^^^^ 431 ^^^^^^^^^^^^^^^^^^^^
409 432
410 .. highlight:: bash 433 .. highlight:: bash