Mercurial > hg > orthanc-book
comparison Sphinx/source/users/rest.rst @ 360:d217af5e6cb3
links to hg
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 30 Mar 2020 20:14:52 +0200 |
parents | 011b01ccf52d |
children | 6d7a36447e21 16dc3561b41e |
comparison
equal
deleted
inserted
replaced
359:9acb9354da1a | 360:d217af5e6cb3 |
---|---|
55 <https://stackoverflow.com/questions/463144/php-http-post-fails-when-curl-data-1024/463277#463277>`__:: | 55 <https://stackoverflow.com/questions/463144/php-http-post-fails-when-curl-data-1024/463277#463277>`__:: |
56 | 56 |
57 $ curl -X POST -H "Expect:" http://localhost:8042/instances --data-binary @CT.X.1.2.276.0.7230010.dcm | 57 $ curl -X POST -H "Expect:" http://localhost:8042/instances --data-binary @CT.X.1.2.276.0.7230010.dcm |
58 | 58 |
59 The code distribution of Orthanc contains a `sample Python script | 59 The code distribution of Orthanc contains a `sample Python script |
60 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/ImportDicomFiles/ImportDicomFiles.py>`__ | 60 <https://hg.orthanc-server.com/orthanc/file/default/Resources/Samples/ImportDicomFiles/ImportDicomFiles.py>`__ |
61 that recursively upload the content of some folder into Orthanc using | 61 that recursively upload the content of some folder into Orthanc using |
62 the REST API:: | 62 the REST API:: |
63 | 63 |
64 $ python ImportDicomFiles.py localhost 8042 ~/DICOM/ | 64 $ python ImportDicomFiles.py localhost 8042 ~/DICOM/ |
65 | 65 |
596 $ curl -X POST http://localhost:8042/modalities/sample/store -d '["d4b46c8e-74b16992-b0f5ca11-f04a60fa-8eb13a88","d5604121-7d613ce6-c315a5-a77b3cf3-9c253b23","cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e"]' | 596 $ curl -X POST http://localhost:8042/modalities/sample/store -d '["d4b46c8e-74b16992-b0f5ca11-f04a60fa-8eb13a88","d5604121-7d613ce6-c315a5-a77b3cf3-9c253b23","cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e"]' |
597 | 597 |
598 The list of the resources to be sent are given as a JSON array. In | 598 The list of the resources to be sent are given as a JSON array. In |
599 this case, a single DICOM connection is used. `Sample code is | 599 this case, a single DICOM connection is used. `Sample code is |
600 available | 600 available |
601 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Python/HighPerformanceAutoRouting.py>`__. | 601 <https://hg.orthanc-server.com/orthanc/file/default/Resources/Samples/Python/HighPerformanceAutoRouting.py>`__. |
602 | 602 |
603 Note that the list of resources to be sent can include the | 603 Note that the list of resources to be sent can include the |
604 :ref:`Orthanc identifiers <orthanc-ids>` of entire patients, | 604 :ref:`Orthanc identifiers <orthanc-ids>` of entire patients, |
605 studies or series as well. | 605 studies or series as well. |
606 | 606 |
920 sequence number the changes must be returned:: | 920 sequence number the changes must be returned:: |
921 | 921 |
922 $ curl 'http://localhost:8042/changes?limit=100&since=922' | 922 $ curl 'http://localhost:8042/changes?limit=100&since=922' |
923 | 923 |
924 A `sample code in the source distribution | 924 A `sample code in the source distribution |
925 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Python/ChangesLoop.py>`__ | 925 <https://hg.orthanc-server.com/orthanc/file/default/Resources/Samples/Python/ChangesLoop.py>`__ |
926 shows how to use this Changes API to implement a polling loop. | 926 shows how to use this Changes API to implement a polling loop. |
927 | 927 |
928 | 928 |
929 Deleting resources from Orthanc | 929 Deleting resources from Orthanc |
930 ------------------------------- | 930 ------------------------------- |