I’m working with initiating sending a study from one Orthanc system (“SEND”) to a configured remote Orthanc peer (“RECV”) however SEND’s API is unavailable to RECV. As a result, it’s my understanding that when my application calls SEND’s API, it needs to instruct SEND to use Asynchronous mode and in doing so, will receive a SEND JobID.
From the online pages there isn’t an example of exactly how to make that API call and wondered if anyone has one that they could share?
I know that this doesn’t work but hopefully it can be seen as to what I’m trying to initiate:
It’s my hope that once I have this, the LUA scripts installed on both SEND and RECV will start to show the results of onJobSubmitted(), onJobFailure() and onJobSuccess()!
Ok, so I’m making (I hope) some forward movement regarding this…
Both SEND and RECV are now operating with the transfers accelerator plugin, which I’m very excited about (!!) as it seems to do exactly what I’m looking for and using the yellow Transfers accelerator button within the GUI moves a study without any issue. Taking this a step in the direction I need to go (my app interfacing with Orthanc) and absorbing the advanced REST features of the API and the TA plugin docs I understand that
TA only operates in asynchronous mode (“Note that the transfers accelerator only runs in asynchronous mode”); as such
I should be using the push mode via a PUT API call (“Sending images to remote Orthanc peers can either be done with HTTP PUT requests (so-called “push mode”) …”)
However, when I try (via Postman) to initiate this…
curl --location --request PUT ‘http://SEND:39042/peers/RECV/store’
–header ‘Content-Type: application/json’
–data-raw ‘[“8aaa82ba-6284d4f6-c163b118-ce0d65db-c67acfb6”]’
I get a “HTTP/405 Method not allowed” response.
Am I totally misreading the documentation here? I feel as if I’m sooo close!!
Yours ever hopeful - and so thankful of this fantastic software …
Great to hear from you sir! I hope you and your family are all well, and Happy New Year (although it seems like ages ago already, doesn’t it?)
Thanks for the link - has this been updated recently, as I don’t recall seeing this level of details before? Also there appears to be something that contradicts your comment about using HTTP/POST:
Sending images to remote Orthanc peers can either be done with HTTP PUT requests (so-called “push mode”), or with HTTP GET requests if the local Orthanc server has a public IP address (so-called “pull mode”)
As you can see, there’s no mention of using HTTP/POST? From https://book.orthanc-server.com/users/advanced-rest.html#id5 it states that transfers using the accelerator plugin results in a job being created, rather than waiting for the execution of the transfer to be completed.
The following briefly outlines my prototype setup:
MYAPP > ORTHA > {internet connection} > ORTHB
MYAPP has no public IP address, so I appreciate that PUSH mode is required.
Considering the timing A is going to take to send to B, I’m after the configuration that I can make an API call to ORTHA and get a JobID back immediately, rather than wait for ORTHA to send to ORTHB and respond with the result. I’m then hoping to use LUA callbacks to post to MYAPP when Jobs complete.
Ah … I think the documentation is stating that between Orthanc systems, it uses an HTTP/PUT for uploading (using push mode) and HTTP/GET for uploading (using pull mode) and downloading.
When interacting with the sending Orthanc system, it is indeed an HTTP/POST that’s used, which returns a JobID.