comparison Sphinx/source/users/advanced-rest.rst @ 817:01fa632daae9 Orthanc-1.10.0

Orthanc 1.10.0
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Feb 2022 15:03:44 +0100
parents 1c3972c03c2a
children d7c8c8f6cffb
comparison
equal deleted inserted replaced
816:908ca7847b9d 817:01fa632daae9
132 * ``Success``: The job has finished with success. 132 * ``Success``: The job has finished with success.
133 * ``Failure``: The job has finished with failure. Check out the 133 * ``Failure``: The job has finished with failure. Check out the
134 ``ErrorCode`` and ``ErrorDescription`` fields for more information. 134 ``ErrorCode`` and ``ErrorDescription`` fields for more information.
135 * ``Paused``: The job has been paused. 135 * ``Paused``: The job has been paused.
136 * ``Retry``: The job has failed internally, and has been scheduled for 136 * ``Retry``: The job has failed internally, and has been scheduled for
137 re-submission after a delay. As of Orthanc 1.9.7, this feature is not 137 re-submission after a delay. As of Orthanc 1.10.0, this feature is not
138 used by any type of job. 138 used by any type of job.
139 139
140 In order to wait for the end of an asynchronous call, the caller will 140 In order to wait for the end of an asynchronous call, the caller will
141 typically have to poll the ``/jobs/...` URI (i.e. make periodic 141 typically have to poll the ``/jobs/...` URI (i.e. make periodic
142 calls), waiting for the ``State`` field to become ``Success`` or 142 calls), waiting for the ``State`` field to become ``Success`` or
143 ``Failure``. 143 ``Failure``.
144 144
145 Note that the `integration tests of Orthanc 145 Note that the `integration tests of Orthanc
146 <https://hg.orthanc-server.com/orthanc-tests/file/Orthanc-1.9.7/Tests/Toolbox.py>`__ 146 <https://hg.orthanc-server.com/orthanc-tests/file/Orthanc-1.10.0/Tests/Toolbox.py>`__
147 give an example about how to monitor a job in Python using the REST 147 give an example about how to monitor a job in Python using the REST
148 API (cf. function ``MonitorJob()``). 148 API (cf. function ``MonitorJob()``).
149 149
150 150
151 .. _jobs-controlling: 151 .. _jobs-controlling:
202 $ curl http://localhost:8042/jobs/82cc02d1-03fe-41f9-be46-a308d16ea94a/archive > a.zip 202 $ curl http://localhost:8042/jobs/82cc02d1-03fe-41f9-be46-a308d16ea94a/archive > a.zip
203 203
204 Note how we retrieve the content of the archive by accessing the 204 Note how we retrieve the content of the archive by accessing the
205 ``archive`` output of the job (check out the virtual method 205 ``archive`` output of the job (check out the virtual method
206 ``IJob::GetOutput()`` from the `source code 206 ``IJob::GetOutput()`` from the `source code
207 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.9.7/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp>`__ 207 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.10.0/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp>`__
208 of Orthanc). 208 of Orthanc).
209 209
210 Here is the corresponding sequence of commands to generate a DICOMDIR 210 Here is the corresponding sequence of commands to generate a DICOMDIR
211 media:: 211 media::
212 212
213 $ curl http://localhost:8042/studies/27f7126f-4f66fb14-03f4081b-f9341db2-53925988/media -d '{"Asynchronous":true}' 213 $ curl http://localhost:8042/studies/27f7126f-4f66fb14-03f4081b-f9341db2-53925988/media -d '{"Asynchronous":true}'
214 $ curl http://localhost:8042/jobs/6332be8a-0052-44fb-8cc2-ac959aeccad9/archive > a.zip 214 $ curl http://localhost:8042/jobs/6332be8a-0052-44fb-8cc2-ac959aeccad9/archive > a.zip
215 215
216 As of Orthanc 1.9.7, only the creation of a ZIP or a DICOMDIR archive 216 As of Orthanc 1.10.0, only the creation of a ZIP or a DICOMDIR archive
217 produces such "outputs". 217 produces such "outputs".
218 218
219 219
220 .. _pdf: 220 .. _pdf:
221 221