Hello,
is it possible to make a query (SELECT) on MariaDB with an Orthanc DB to retrive :
AccessionNumber, Study Instance UID and the study ID (I mean the the one retrived with Curl command)
Thanks
Max
Hello,
is it possible to make a query (SELECT) on MariaDB with an Orthanc DB to retrive :
AccessionNumber, Study Instance UID and the study ID (I mean the the one retrived with Curl command)
Thanks
Max
Well, you can query the DB directly if you wish but we always recommend to use the API instead: http://book.orthanc-server.com/users/rest.html#performing-finds-within-orthanc
Sorry what is the syntax error in this query ?
--request POST --url [http://localhost:8042/tools/find](http://localhost:8042/tools/find) --data '{"Level":"Instance","Query":{"AccessionNumber”:”86472”}}'
Biotron spa
You use non-ASCII quotes (”) in this query. Try with:
$ curl --request POST --url http://localhost:8042/tools/find --data ‘{“Level”:“Instance”,“Query”:{“AccessionNumber”:“86472”}}’
This is what happens :
C:\curl-7.62.0-win64-mingw\bin>curl --request POST --url http://localhost:8042/t
ools/find --data ‘{“Level”:“Instance”,“Query”:{“AccessionNumber”:“86472”}}’
{
“HttpError” : “Bad Request”,
“HttpStatus” : 400,
“Message” : “Bad request”,
“Method” : “POST”,
“OrthancError” : “Bad request”,
“OrthancStatus” : 8,
“Uri” : “/tools/find”
}
Any ideas ?
Max
The escaping rules for quotes are different on Windows (that you use) and on Linux (that I use):
https://en.wikipedia.org/wiki/Escape_character#Windows_Command_Prompt
I let Windows users provide the good command line.
curl --request POST --url http://localhost:8042/tools/find --data “{"Level":"Instance","Query":{"AccessionNumber":"86472"}}”
Thank u very much !
And if I have a system with user authentication, what is the correct syntax for user “test” and pw “test1” ?
I mean like :
(but this do not work…)
Max
Please check the resources on the web about HTTP basic authentication. This is an Orthanc forum, not a general HTTP forum.
http://lmgtfy.com/?q=how+to+pass+basic+authentication+in+url
Here would be the corresponding URL:
http://test:test1@localhost:8042/osimis-viewer/app/index.html?study=b610a703-ae8920e6-61753a51-9ba91ecc-1f72674a
If using curl, you can use the “-u” command-line option:
HTH,
Sébastien-