Mercurial > hg > orthanc-book
comparison Sphinx/source/faq/features.rst @ 645:187a18c6c646
fix links
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 24 Apr 2021 10:45:36 +0200 |
parents | 411e82bb3a9f |
children | a6e371768a70 |
comparison
equal
deleted
inserted
replaced
644:a180cf06a2f3 | 645:187a18c6c646 |
---|---|
341 | 341 |
342 If one needs to subsequently modify or delete this metadata, the HTTP | 342 If one needs to subsequently modify or delete this metadata, the HTTP |
343 client must set this value of ``ETag`` into the ``If-Match`` HTTP | 343 client must set this value of ``ETag`` into the ``If-Match`` HTTP |
344 header:: | 344 header:: |
345 | 345 |
346 $ curl -v http://localhost:8042/instances/19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5/metadata/1024 -X PUT -d 'Hello 2' -H 'If-Match: 0' | 346 $ curl -v http://localhost:8042/instances/19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5/metadata/1024 -X PUT -d 'Hello 2' -H 'If-Match: "0"' |
347 [...] | 347 [...] |
348 < ETag: "1" | 348 < ETag: "1" |
349 | 349 |
350 Note how this second call has incremented the value of ``ETag``: This | 350 Note how this second call has incremented the value of ``ETag``: This |
351 is the new revision number to be used in future updates. If a bad | 351 is the new revision number to be used in future updates. If a bad |
352 revision number is provided, the HTTP error ``409 Conflict`` is | 352 revision number is provided, the HTTP error ``409 Conflict`` is |
353 generated:: | 353 generated:: |
354 | 354 |
355 $ curl -v http://localhost:8042/instances/19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5/metadata/1024 -X PUT -d 'Hello 3' -H 'If-Match: 0' | 355 $ curl -v http://localhost:8042/instances/19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5/metadata/1024 -X PUT -d 'Hello 3' -H 'If-Match: "0"' |
356 [...] | 356 [...] |
357 < HTTP/1.1 409 Conflict | 357 < HTTP/1.1 409 Conflict |
358 | 358 |
359 Such a ``409`` error must be handled by the higher-level | 359 Such a ``409`` error must be handled by the higher-level |
360 application. The revision number must similarly be given if deleting a | 360 application. The revision number must similarly be given if deleting a |
361 metadata/attachment:: | 361 metadata/attachment:: |
362 | 362 |
363 $ curl -v http://localhost:8042/instances/19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5/metadata/1024 -X DELETE -H 'If-Match: 1' | 363 $ curl -v http://localhost:8042/instances/19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5/metadata/1024 -X DELETE -H 'If-Match: "1"' |
364 [...] | 364 [...] |
365 < HTTP/1.1 200 OK | 365 < HTTP/1.1 200 OK |
366 | 366 |
367 Check out the `OpenAPI reference <https://api.orthanc-server.com/>` of | 367 Check out the `OpenAPI reference <https://api.orthanc-server.com/>`__ |
368 the REST API of Orthanc for more information. | 368 of the REST API of Orthanc for more information. |
369 | 369 |
370 **Warning:** The database index back-end must support revisions. As of | 370 **Warning:** The database index back-end must support revisions. As of |
371 writing, only the **PostgreSQL plugin** in versions above 4.0 | 371 writing, only the **PostgreSQL plugin** in versions above 4.0 |
372 implement support for revisions. | 372 implement support for revisions. |