Mercurial > hg > orthanc-book
comparison Sphinx/source/users/advanced-rest.rst @ 607:eaa6cdfa7ba6 Orthanc-1.9.0
Orthanc 1.9.0
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 29 Jan 2021 12:26:47 +0100 |
parents | ef64d0769014 |
children | cfeb018b9150 |
comparison
equal
deleted
inserted
replaced
606:2f000ee9b20d | 607:eaa6cdfa7ba6 |
---|---|
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.2, this feature is not | 131 re-submission after a delay. As of Orthanc 1.9.0, 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.2/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp>`__ | 196 <https://hg.orthanc-server.com/orthanc/file/Orthanc-1.9.0/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.2, only the creation of a ZIP or a DICOMDIR archive | 205 As of Orthanc 1.9.0, 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 |