Multi-threaded API send

Does anyone know if there’s a way of sending, through the API, multiple images? I have 6000 image studies and it takes forever to send them through the API call. I already have the optional Expect: header but I have to make the call for each individual file.

I don’t see anywhere in the documentation where I can send multiple files.

I also question whether or not it would be quicker to send them via DICOM, as opposed to the API. Any comments on that?

Thanks!

BNOEAFK

Hello,

You could POST a ZIP archive containing multiple DICOM files (possibly with no compression) to the “/instances” route in the built-in REST API of Orthanc.

You could also use the STOW-RS standard implemented by the DICOMweb plugin of Orthanc:
https://book.orthanc-server.com/plugins/dicomweb.html

As an alternative, you could also implement a Python plugin to add a new dedicated route to the REST API:

https://book.orthanc-server.com/plugins/python.html#extending-the-rest-api

Note that such Python plugins are limited to 32bit buffers. If you must send more than 4GB at once, you should create a C/C++ plugin that uses “OrthancPluginRegisterChunkedRestCallback()”:

https://sdk.orthanc-server.com/group__Callbacks.html#gaf8f27a131282c5452bdcd3035633bd95

HTH,

Sébastien-