comparison Sphinx/source/users/advanced-rest.rst @ 554:4f3a6145ae34

Orthanc 1.8.1
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 Dec 2020 17:48:33 +0100
parents 931052bd5a53
children 090cc988c35e
comparison
equal deleted inserted replaced
553:608094adf405 554:4f3a6145ae34
126 * ``Success``: The job has finished with success. 126 * ``Success``: The job has finished with success.
127 * ``Failure``: The job has finished with failure. Check out the 127 * ``Failure``: The job has finished with failure. Check out the
128 ``ErrorCode`` and ``ErrorDescription`` fields for more information. 128 ``ErrorCode`` and ``ErrorDescription`` fields for more information.
129 * ``Paused``: The job has been paused. 129 * ``Paused``: The job has been paused.
130 * ``Retry``: The job has failed internally, and has been scheduled for 130 * ``Retry``: The job has failed internally, and has been scheduled for
131 re-submission after a delay. As of Orthanc 1.8.0, this feature is not 131 re-submission after a delay. As of Orthanc 1.8.1, this feature is not
132 used by any type of job. 132 used by any type of job.
133 133
134 In order to wait for the end of an asynchronous call, the caller will 134 In order to wait for the end of an asynchronous call, the caller will
135 typically have to poll the ``/jobs/...` URI (i.e. make periodic 135 typically have to poll the ``/jobs/...` URI (i.e. make periodic
136 calls), waiting for the ``State`` field to become ``Success`` or 136 calls), waiting for the ``State`` field to become ``Success`` or
191 $ curl http://localhost:8042/jobs/82cc02d1-03fe-41f9-be46-a308d16ea94a/archive > a.zip 191 $ curl http://localhost:8042/jobs/82cc02d1-03fe-41f9-be46-a308d16ea94a/archive > a.zip
192 192
193 Note how we retrieve the content of the archive by accessing the 193 Note how we retrieve the content of the archive by accessing the
194 ``archive`` output of the job (check out the virtual method 194 ``archive`` output of the job (check out the virtual method
195 ``IJob::GetOutput()`` from the `source code 195 ``IJob::GetOutput()`` from the `source code
196 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.8.0/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp>`__ 196 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.8.1/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp>`__
197 of Orthanc). 197 of Orthanc).
198 198
199 Here is the corresponding sequence of commands to generate a DICOMDIR 199 Here is the corresponding sequence of commands to generate a DICOMDIR
200 media:: 200 media::
201 201
202 $ curl http://localhost:8042/studies/27f7126f-4f66fb14-03f4081b-f9341db2-53925988/media -d '{"Asynchronous":true}' 202 $ curl http://localhost:8042/studies/27f7126f-4f66fb14-03f4081b-f9341db2-53925988/media -d '{"Asynchronous":true}'
203 $ curl http://localhost:8042/jobs/6332be8a-0052-44fb-8cc2-ac959aeccad9/archive > a.zip 203 $ curl http://localhost:8042/jobs/6332be8a-0052-44fb-8cc2-ac959aeccad9/archive > a.zip
204 204
205 As of Orthanc 1.8.0, only the creation of a ZIP or a DICOMDIR archive 205 As of Orthanc 1.8.1, only the creation of a ZIP or a DICOMDIR archive
206 produces such "outputs". 206 produces such "outputs".
207 207
208 208
209 .. _pdf: 209 .. _pdf:
210 210