Mercurial > hg > orthanc-book
comparison Sphinx/source/users/rest.rst @ 662:88503c6e549f
list of items in /tools/find
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Apr 2021 12:54:51 +0200 |
parents | 06bea33cb7d0 |
children | be71b56c90ab |
comparison
equal
deleted
inserted
replaced
661:36bf58dfb7f7 | 662:88503c6e549f |
---|---|
867 | 867 |
868 Performing Finds within Orthanc | 868 Performing Finds within Orthanc |
869 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 869 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
870 .. highlight:: bash | 870 .. highlight:: bash |
871 | 871 |
872 Performing a find within Orthanc is very similar to using Queries | 872 Performing a find within the local database of Orthanc is very similar |
873 against DICOM modalities and the additional options listed above work | 873 to using Queries against DICOM modalities and the additional options |
874 with find also. When performing a find, you will receive the Orthanc | 874 listed above work with find also. When performing a find, you will |
875 ID's of all the matched items within your find. For example if you | 875 receive the Orthanc ID's of all the matched items within your |
876 perform a study level find and 5 Studies match you will receive 5 | 876 find. For example if you perform a study level find and 5 Studies |
877 study level Orthanc ID's in JSON format as a response:: | 877 match you will receive 5 study level Orthanc ID's in JSON format as a |
878 response:: | |
878 | 879 |
879 $ curl --request POST --url http://localhost:8042/tools/find \ | 880 $ curl --request POST --url http://localhost:8042/tools/find \ |
880 --data '{ | 881 --data '{ |
881 "Level" : "Instance", | 882 "Level" : "Instance", |
882 "Query" : { | 883 "Query" : { |
922 "8ea120d7-5057d919-837dfbcc-ccd04e0f-7f3a94aa" | 923 "8ea120d7-5057d919-837dfbcc-ccd04e0f-7f3a94aa" |
923 ], | 924 ], |
924 "Type" : "Study" | 925 "Type" : "Study" |
925 } | 926 } |
926 ] | 927 ] |
928 | |
929 Here is a sample REST API call to find the Orthanc identifiers of all | |
930 the DICOM series generated by an imaging modality whose "Device Serial | |
931 Number (0018,1000)" DICOM tag is equal to "123":: | |
932 | |
933 $ curl -X POST http://localhost:8042/tools/find -d '{"Level":"Series","Query":{"DeviceSerialNumber":"123"},"Expand":true}' | |
934 | |
935 If you are interested by a **list of several items** (in this case, in | |
936 a list of serial numbers), just separate them with backslashes as | |
937 would do with DICOM C-FIND:: | |
938 | |
939 $ curl -X POST http://localhost:8042/tools/find -d '{"Level":"Series","Query":{"DeviceSerialNumber":"123\\abc"},"Expand":true}' | |
927 | 940 |
928 | 941 |
929 | 942 |
930 Additional Options | 943 Additional Options |
931 ^^^^^^^^^^^^^^^^^^ | 944 ^^^^^^^^^^^^^^^^^^ |