# HG changeset patch # User Sebastien Jodogne # Date 1605695104 -3600 # Node ID 931052bd5a5335a4ab5e9aaef747a25370cccb03 # Parent d7ec7ea133b8e738e5b6073ece09da6f956e2a5d explain the "Parent" field in "/tools/create-dicom" for PDF diff -r d7ec7ea133b8 -r 931052bd5a53 Sphinx/source/users/advanced-rest.rst --- a/Sphinx/source/users/advanced-rest.rst Thu Nov 12 09:26:24 2020 +0100 +++ b/Sphinx/source/users/advanced-rest.rst Wed Nov 18 11:25:04 2020 +0100 @@ -217,12 +217,16 @@ They convert the ``HelloWorld2.pdf`` file to base64, then perform a ``POST`` request with JSON data containing the converted payload. +Importantly, the ``Parent`` field of the ``POST`` body can be set to +the :ref:`Orthanc identifier of some study ` in order to +attach the newly-created PDF series to the given parent study. + Using bash: .. code-block:: bash # create the json data, with the BASE64 data embedded in it - (echo -n '{"Tags" : {"PatientName" : "Benjamino", "Modality" : "CT"},"Content" : "data:application/pdf;base64,'; base64 HelloWorld2.pdf; echo '"}') > /tmp/foo + (echo -n '{"Parent": "b6e8436b-c5835b7b-cecc9576-0483e165-ab5c710b", "Tags" : {"Modality" : "CT"}, "Content" : "data:application/pdf;base64,'; base64 HelloWorld2.pdf; echo '"}') > /tmp/foo # upload it to Orthanc cat /tmp/foo | curl -H "Content-Type: application/json" -d @- http://localhost:8042/tools/create-dicom