Mercurial > hg > orthanc-book
comparison Sphinx/source/users/advanced-rest.rst @ 991:1316bc62b5d5
migration to UCLouvain servers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 21 Nov 2023 21:09:02 +0100 |
parents | 27b75c653a8b |
children | 2e103fb1fa11 |
comparison
equal
deleted
inserted
replaced
990:27b75c653a8b | 991:1316bc62b5d5 |
---|---|
146 typically have to poll the ``/jobs/...`` URI (i.e. make periodic | 146 typically have to poll the ``/jobs/...`` URI (i.e. make periodic |
147 calls), waiting for the ``State`` field to become ``Success`` or | 147 calls), waiting for the ``State`` field to become ``Success`` or |
148 ``Failure``. | 148 ``Failure``. |
149 | 149 |
150 Note that the `integration tests of Orthanc | 150 Note that the `integration tests of Orthanc |
151 <https://hg.orthanc-server.com/orthanc-tests/file/Orthanc-1.12.1/Tests/Toolbox.py>`__ | 151 <https://orthanc.uclouvain.be/hg/orthanc-tests/file/Orthanc-1.12.1/Tests/Toolbox.py>`__ |
152 give an example about how to monitor a job in Python using the REST | 152 give an example about how to monitor a job in Python using the REST |
153 API (cf. function ``MonitorJob()``). | 153 API (cf. function ``MonitorJob()``). |
154 | 154 |
155 | 155 |
156 .. _jobs-priority: | 156 .. _jobs-priority: |
176 * Pause the job by POST-ing to ``/jobs/.../pause``. | 176 * Pause the job by POST-ing to ``/jobs/.../pause``. |
177 * Resume a job in ``Paused`` state by POST-ing to ``/jobs/.../resume``. | 177 * Resume a job in ``Paused`` state by POST-ing to ``/jobs/.../resume``. |
178 * Retry a job in ``Failed`` state by POST-ing to ``/jobs/.../resubmit``. | 178 * Retry a job in ``Failed`` state by POST-ing to ``/jobs/.../resubmit``. |
179 | 179 |
180 The related state machine is depicted in the `implementation notes | 180 The related state machine is depicted in the `implementation notes |
181 <https://hg.orthanc-server.com/orthanc/raw-file/default/OrthancServer/Resources/ImplementationNotes/JobsEngineStates.pdf>`__. | 181 <https://orthanc.uclouvain.be/hg/orthanc/raw-file/default/OrthancServer/Resources/ImplementationNotes/JobsEngineStates.pdf>`__. |
182 | 182 |
183 | 183 |
184 Example: Asynchronous generation of an archive | 184 Example: Asynchronous generation of an archive |
185 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 185 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
186 | 186 |
219 $ curl http://localhost:8042/jobs/82cc02d1-03fe-41f9-be46-a308d16ea94a/archive > a.zip | 219 $ curl http://localhost:8042/jobs/82cc02d1-03fe-41f9-be46-a308d16ea94a/archive > a.zip |
220 | 220 |
221 Note how we retrieve the content of the archive by accessing the | 221 Note how we retrieve the content of the archive by accessing the |
222 ``archive`` output of the job (check out the virtual method | 222 ``archive`` output of the job (check out the virtual method |
223 ``IJob::GetOutput()`` from the `source code | 223 ``IJob::GetOutput()`` from the `source code |
224 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.12.1/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp>`__ | 224 <https://orthanc.uclouvain.be/hg/orthanc/file/Orthanc-1.12.1/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp>`__ |
225 of Orthanc). | 225 of Orthanc). |
226 | 226 |
227 Here is the corresponding sequence of commands to generate a DICOMDIR | 227 Here is the corresponding sequence of commands to generate a DICOMDIR |
228 media:: | 228 media:: |
229 | 229 |