Unable to run Orthanc query retrieve command on Windows Server 2012

Dear Orthanc community members,

Wish to share that we are unable to run Orthanc query retrieve command on Windows Server 2012. We get no output while running
$curl -X POST http://localhost:8042/tools/find -d '{"Query”:{“Modality”: “CR”}}’. In certain cases, it returns -

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 223 100 195 100 28 190k 28000 --:–:-- --:–:-- --:–:-- 217k{
“HttpError” : “Bad Request”,
“HttpStatus” : 400,
“Message” : “Bad request”,
“Method” : “POST”,
“OrthancError” : “Bad request”,
“OrthancStatus” : 8,
“Uri” : “/tools/find”
}

Wish to share that we are able to do query and retrieve via the user interface and have setup the configuration file as guided in the previous threads.

Further, we are able to run query and retrieve successfully on our local workstation using Windows 10.

Please let us know your feedback/pointers. Appreciate your support.

Looking forward to arriving at a good conclusion on the issue.

Regards,

Manu Sheel Gupta

Hello,

You need to specify the “Level” argument as well.

Check out the integration tests:
https://bitbucket.org/sjodogne/orthanc-tests/src/90e5331ddee905afbe4657e7547c8e10bdb2349d/Tests/Tests.py#Tests.py-1490

HTH,
Sébastien-

Hi Sébastien,

Thank you so much for sharing the pointers. Appreciate it.

We did try adding the Level argument and updated the query to

curl -X POST http://localhost:8042/tools/find -d '{"Level”:”Patient”,”Query”:{“Modality”:”CR”}}’

Wish to share that we are still getting the same issue on Windows Server 2012. We even tried changing the value of Level field to Series and Study.

Please let us know if there is anything else that might be causing the issue on Windows Server 2012. Wish to further ask that would you recommend that we should upgrade to Windows Server 2016.

Looking forward to hearing your feedback.

Regards,

Manu

This works for me no problem, on 2012 R2.

curl --request POST --url http://localhost:8042/tools/find --data ‘{“Level”:“Patient”,“Query”:{“Modality”:“CR”}}’

Dear Bryan,

Thank you so much for sharing the command with the updated syntax. It works well at our end too.

Appreciate your pointers. Thanks again :slight_smile:

Regards,

Manu