Mercurial > hg > orthanc-book
comparison Sphinx/source/users/rest.rst @ 449:2922fb1bd65e
fix links
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 03 Jul 2020 09:33:10 +0200 |
parents | 943515b68158 |
children | 7daa331a91a9 |
comparison
equal
deleted
inserted
replaced
447:74fc0203d882 | 449:2922fb1bd65e |
---|---|
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://hg.orthanc-server.com/orthanc/file/default/Resources/Samples/ImportDicomFiles/ImportDicomFiles.py>`__ | 60 <https://hg.orthanc-server.com/orthanc/file/default/OrthancServer/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 |
627 $ 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"]' | 627 $ 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"]' |
628 | 628 |
629 The list of the resources to be sent are given as a JSON array. In | 629 The list of the resources to be sent are given as a JSON array. In |
630 this case, a single DICOM connection is used. `Sample code is | 630 this case, a single DICOM connection is used. `Sample code is |
631 available | 631 available |
632 <https://hg.orthanc-server.com/orthanc/file/default/Resources/Samples/Python/HighPerformanceAutoRouting.py>`__. | 632 <https://hg.orthanc-server.com/orthanc/file/default/OrthancServer/Resources/Samples/Python/HighPerformanceAutoRouting.py>`__. |
633 | 633 |
634 Note that the list of resources to be sent can include the | 634 Note that the list of resources to be sent can include the |
635 :ref:`Orthanc identifiers <orthanc-ids>` of entire patients, | 635 :ref:`Orthanc identifiers <orthanc-ids>` of entire patients, |
636 studies or series as well. | 636 studies or series as well. |
637 | 637 |
1010 sequence number the changes must be returned:: | 1010 sequence number the changes must be returned:: |
1011 | 1011 |
1012 $ curl 'http://localhost:8042/changes?limit=100&since=922' | 1012 $ curl 'http://localhost:8042/changes?limit=100&since=922' |
1013 | 1013 |
1014 A `sample code in the source distribution | 1014 A `sample code in the source distribution |
1015 <https://hg.orthanc-server.com/orthanc/file/default/Resources/Samples/Python/ChangesLoop.py>`__ | 1015 <https://hg.orthanc-server.com/orthanc/file/default/OrthancServer/Resources/Samples/Python/ChangesLoop.py>`__ |
1016 shows how to use this Changes API to implement a polling loop. | 1016 shows how to use this Changes API to implement a polling loop. |
1017 | 1017 |
1018 | 1018 |
1019 Deleting resources from Orthanc | 1019 Deleting resources from Orthanc |
1020 ------------------------------- | 1020 ------------------------------- |