UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 341 kB
{"openapi":"3.0.0","servers":[{"url":"https://demo.orthanc-server.com/"}],"info":{"description":"This is the full documentation of the [REST API](https://book.orthanc-server.com/users/rest.html) of Orthanc.<p>This reference is automatically generated from the source code of Orthanc. A [shorter cheat sheet](https://book.orthanc-server.com/users/rest-cheatsheet.html) is part of the Orthanc Book.<p>An earlier, manually crafted version from August 2019, is [still available](2019-08-orthanc-openapi.html), but is not up-to-date anymore ([source](https://groups.google.com/g/orthanc-users/c/NUiJTEICSl8/m/xKeqMrbqAAAJ)).","title":"Orthanc API","version":"1.12.0","x-apisguru-categories":["collaboration"],"x-origin":[{"format":"openapi","url":"https://api.orthanc-server.com/orthanc-openapi.json","version":"3.0"}],"x-providerName":"orthanc-server.com"},"paths":{"/changes":{"delete":{"deprecated":false,"description":"Clear the full history stored in the changes log","parameters":[],"responses":{"200":{"description":""}},"summary":"Clear changes","tags":["Tracking changes"]},"get":{"deprecated":false,"description":"Whenever Orthanc receives a new DICOM instance, this event is recorded in the so-called _Changes Log_. This enables remote scripts to react to the arrival of new DICOM resources. A typical application is auto-routing, where an external script waits for a new DICOM instance to arrive into Orthanc, then forward this instance to another modality.","parameters":[{"description":"Limit the number of results","in":"query","name":"limit","required":false,"schema":{"type":"number"}},{"description":"Show only the resources since the provided index","in":"query","name":"since","required":false,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"The list of changes","example":{"Changes":[{"ChangeType":"NewInstance","Date":"20180414T091510","ID":"055bfbaf-2aae936c-82ed5a9a-9267f8b7-416a4000","Path":"/instances/055bfbaf-2aae936c-82ed5a9a-9267f8b7-416a4000","ResourceType":"Instance","Seq":1},{"ChangeType":"NewSeries","Date":"20180414T091510","ID":"318603c5-03e8cffc-a82b6ee1-3ccd3c1e-18d7e3bb","Path":"/series/318603c5-03e8cffc-a82b6ee1-3ccd3c1e-18d7e3bb","ResourceType":"Series","Seq":2}],"Done":false,"Last":2},"properties":{"Changes":{"description":"The individual changes","items":{"type":"object"},"type":"array"},"Done":{"description":"Whether the last reported change is the last of the full history","type":"boolean"},"Last":{"description":"The index of the last reported change, can be used for the `since` argument in subsequent calls to this route","type":"number"}}}}},"description":""}},"summary":"List changes","tags":["Tracking changes"]}},"/exports":{"delete":{"deprecated":false,"description":"Clear the full history stored in the exports log","parameters":[],"responses":{"200":{"description":""}},"summary":"Clear exports","tags":["Tracking changes"]},"get":{"deprecated":false,"description":"For medical traceability, Orthanc can be configured to store a log of all the resources that have been exported to remote modalities. In auto-routing scenarios, it is important to prevent this log to grow indefinitely as incoming instances are routed. You can either disable this logging by setting the option `LogExportedResources` to `false` in the configuration file, or periodically clear this log by `DELETE`-ing this URI. This route might be removed in future versions of Orthanc.","parameters":[{"description":"Limit the number of results","in":"query","name":"limit","required":false,"schema":{"type":"number"}},{"description":"Show only the resources since the provided index","in":"query","name":"since","required":false,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"examples":{},"schema":{"description":"The list of exports"}}},"description":""}},"summary":"List exports","tags":["Tracking changes"]}},"/instances":{"get":{"deprecated":false,"description":"List the Orthanc identifiers of all the available DICOM instances","parameters":[{"description":"If present, retrieve detailed information about the individual instances","in":"query","name":"expand","required":false,"schema":{"type":"string"}},{"description":"If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value)","in":"query","name":"full","required":false,"schema":{"type":"boolean"}},{"description":"Limit the number of results","in":"query","name":"limit","required":false,"schema":{"type":"number"}},{"description":"If present, list the DICOM Tags you want to list in the response. This argument is a semi-column separated list of DICOM Tags identifiers; e.g: 'requestedTags=0010,0010;PatientBirthDate'. The tags requested tags are returned in the 'RequestedTags' field in the response. Note that, if you are requesting tags that are not listed in the Main Dicom Tags stored in DB, building the response might be slow since Orthanc will need to access the DICOM files. If not specified, Orthanc will return ","in":"query","name":"requestedTags","required":false,"schema":{"type":"string"}},{"description":"If present, report the DICOM tags in hexadecimal format","in":"query","name":"short","required":false,"schema":{"type":"boolean"}},{"description":"Show only the resources since the provided index","in":"query","name":"since","required":false,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"JSON array containing either the Orthanc identifiers, or detailed information about the reported instances (if `expand` argument is provided)","example":["055bfbaf-2aae936c-82ed5a9a-9267f8b7-416a4000","62dc1ec1-9fc2dd9d-aa66eae1-0db608b1-e17f8ce8"]}}},"description":""}},"summary":"List the available instances","tags":["Instances"]},"post":{"deprecated":false,"description":"Upload DICOM instances","parameters":[],"requestBody":{"content":{"application/dicom":{"schema":{"description":"DICOM file to be uploaded"}},"application/zip":{"schema":{"description":"ZIP archive containing DICOM files (new in Orthanc 1.8.2)"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Information about the uploaded instance, or list of information for each uploaded instance in the case of ZIP archive","example":{"ID":"19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5","ParentPatient":"ef9d77db-eb3b2bef-9b31fd3e-bf42ae46-dbdb0cc3","ParentSeries":"3774320f-ccda46d8-69ee8641-9e791cbf-3ecbbcc6","ParentStudy":"66c8e41e-ac3a9029-0b85e42a-8195ee0a-92c2e62e","Path":"/instances/19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5","Status":"Success"},"properties":{"ID":{"description":"Orthanc identifier of the new instance","type":"string"},"ParentPatient":{"description":"Orthanc identifier of the parent patient","type":"string"},"ParentSeries":{"description":"Orthanc identifier of the parent series","type":"string"},"ParentStudy":{"description":"Orthanc identifier of the parent study","type":"string"},"Path":{"description":"Path to the new instance in the REST API","type":"string"},"Status":{"description":"Can be `Success`, `AlreadyStored`, `Failure`, or `FilteredOut` (removed by some `NewInstanceFilter`)","type":"string"}}}}},"description":""}},"summary":"Upload DICOM instances","tags":["Instances"]}},"/instances/{id}":{"delete":{"deprecated":false,"description":"Delete the DICOM instance whose Orthanc identifier is provided in the URL","parameters":[{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Delete some instance","tags":["Instances"]},"get":{"deprecated":false,"description":"Get detailed information about the DICOM instance whose Orthanc identifier is provided in the URL","parameters":[{"description":"If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value)","in":"query","name":"full","required":false,"schema":{"type":"boolean"}},{"description":"If present, list the DICOM Tags you want to list in the response. This argument is a semi-column separated list of DICOM Tags identifiers; e.g: 'requestedTags=0010,0010;PatientBirthDate'. The tags requested tags are returned in the 'RequestedTags' field in the response. Note that, if you are requesting tags that are not listed in the Main Dicom Tags stored in DB, building the response might be slow since Orthanc will need to access the DICOM files. If not specified, Orthanc will return ","in":"query","name":"requestedTags","required":false,"schema":{"type":"string"}},{"description":"If present, report the DICOM tags in hexadecimal format","in":"query","name":"short","required":false,"schema":{"type":"boolean"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Information about the DICOM instance","example":{"FileSize":526744,"FileUuid":"dc031d9e-ef02-4871-821f-ffe445deb7c2","ID":"d94d9a03-3003b047-a4affc69-322313b2-680530a2","IndexInSeries":155,"MainDicomTags":{"AcquisitionNumber":"4","ImageOrientationPatient":"1\\0\\0\\0\\1\\0","ImagePositionPatient":"-249.51171875\\-458.51171875\\314","InstanceCreationDate":"20151217","InstanceCreationTime":"125204.215000","InstanceNumber":"155","SOPInstanceUID":"1.3.6.1.4.1.14519.5.2.1.2193.7172.168997935789297163075628247666"},"ParentSeries":"52f4cb90-29d1d1a2-2ca34edd-4b8851fc-8cb269f2","Type":"Instance"}}}},"description":""}},"summary":"Get information about some instance","tags":["Instances"]}},"/instances/{id}/anonymize":{"post":{"deprecated":false,"description":"Download an anonymized version of the DICOM instance whose Orthanc identifier is provided in the URL: https://book.orthanc-server.com/users/anonymization.html#anonymization-of-a-single-instance","parameters":[{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"","properties":{"DicomVersion":{"description":"Version of the DICOM standard to be used for anonymization. Check out configuration option `DeidentifyLogsDicomVersion` for possible values.","type":"string"},"Force":{"description":"Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world","type":"boolean"},"Keep":{"description":"List of DICOM tags whose value must not be destroyed by the anonymization. Starting with Orthanc 1.9.4, paths to subsequences can be provided using the same syntax as the `dcmodify` command-line tool (wildcards are supported as well).","items":{"type":"string"},"type":"array"},"KeepPrivateTags":{"description":"Keep the private tags from the DICOM instances (defaults to `false`)","type":"boolean"},"KeepSource":{"description":"If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc.","type":"boolean"},"PrivateCreator":{"description":"The private creator to be used for private tags in `Replace`","type":"string"},"Remove":{"description":"List of additional tags to be removed from the DICOM instances. Starting with Orthanc 1.9.4, paths to subsequences can be provided using the same syntax as the `dcmodify` command-line tool (wildcards are supported as well).","items":{"type":"string"},"type":"array"},"Replace":{"description":"Associative array to change the value of some DICOM tags in the DICOM instances. Starting with Orthanc 1.9.4, paths to subsequences can be provided using the same syntax as the `dcmodify` command-line tool (wildcards are supported as well).","type":"object"},"Transcode":{"description":"Transcode the DICOM instances to the provided DICOM transfer syntax: https://book.orthanc-server.com/faq/transcoding.html","type":"string"}}}}}},"responses":{"200":{"content":{"application/dicom":{"examples":{},"schema":{"description":"The anonymized DICOM instance"}}},"description":""}},"summary":"Anonymize instance","tags":["Instances"]}},"/instances/{id}/attachments":{"get":{"deprecated":false,"description":"Get the list of attachments that are associated with the given instance","parameters":[{"description":"If present, retrieve the attachments list and their numerical ids","in":"query","name":"full","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"JSON array containing the names of the attachments","example":["dicom","dicom-as-json"]}}},"description":""}},"summary":"List attachments","tags":["Instances"]}},"/instances/{id}/attachments/{name}":{"delete":{"deprecated":false,"description":"Delete an attachment associated with the given DICOM instance. This call will fail if trying to delete a system attachment (i.e. whose index is < 1024).","parameters":[{"description":"Revision of the attachment, to check if its content has not changed and can be deleted. This header is mandatory if `CheckRevisions` option is `true`.","in":"header","name":"If-Match","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Delete attachment","tags":["Instances"]},"get":{"deprecated":false,"description":"Get the list of the operations that are available for attachments associated with the given instance","parameters":[{"description":"Optional revision of the attachment, to check if its content has changed","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"List of the available operations","example":["compress","compressed-data","compressed-md5","compressed-size","data","info","is-compressed","md5","size","uncompress","verify-md5","uuid"]}}},"description":"","headers":{"ETag":{"description":"Revision of the attachment, to be used in further `PUT` or `DELETE` operations","schema":{"type":"string"}}}}},"summary":"List operations on attachments","tags":["Other"]},"put":{"deprecated":false,"description":"Attach a file to the given DICOM instance. This call will fail if trying to modify a system attachment (i.e. whose index is < 1024).","parameters":[{"description":"Revision of the attachment, if this is not the first time this attachment is set.","in":"header","name":"If-Match","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/octet-stream":{"schema":{"description":"Binary data containing the attachment"}}}},"responses":{"200":{"content":{"application/json":{"examples":{},"schema":{"description":"Empty JSON object in the case of a success"}}},"description":""}},"summary":"Set attachment","tags":["Instances"]}},"/instances/{id}/attachments/{name}/compress":{"post":{"deprecated":false,"description":"Change the compression scheme that is used to store an attachment.","parameters":[{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Compress attachment","tags":["Instances"]}},"/instances/{id}/attachments/{name}/compressed-data":{"get":{"deprecated":false,"description":"Get the (binary) content of one attachment associated with the given instance. The attachment will not be decompressed if `StorageCompression` is `true`.","parameters":[{"description":"Optional revision of the metadata, to check if its content has changed","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"examples":{},"schema":{"description":"The attachment"}}},"description":"","headers":{"ETag":{"description":"Revision of the attachment, to be used in further `PUT` or `DELETE` operations","schema":{"type":"string"}}}}},"summary":"Get attachment (no decompression)","tags":["Instances"]}},"/instances/{id}/attachments/{name}/compressed-md5":{"get":{"deprecated":false,"description":"Get the MD5 hash of one attachment associated with the given instance, as stored on the disk. This is different from `.../md5` iff `EnableStorage` is `true`.","parameters":[{"description":"Optional revision of the attachment, to check if its content has changed","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"examples":{},"schema":{"description":"The MD5 of the attachment, as stored on the disk"}}},"description":"","headers":{"ETag":{"description":"Revision of the attachment, to be used in further `PUT` or `DELETE` operations","schema":{"type":"string"}}}}},"summary":"Get MD5 of attachment on disk","tags":["Instances"]}},"/instances/{id}/attachments/{name}/compressed-size":{"get":{"deprecated":false,"description":"Get the size of one attachment associated with the given instance, as stored on the disk. This is different from `.../size` iff `EnableStorage` is `true`.","parameters":[{"description":"Optional revision of the attachment, to check if its content has changed","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"examples":{},"schema":{"description":"The size of the attachment, as stored on the disk"}}},"description":"","headers":{"ETag":{"description":"Revision of the attachment, to be used in further `PUT` or `DELETE` operations","schema":{"type":"string"}}}}},"summary":"Get size of attachment on disk","tags":["Instances"]}},"/instances/{id}/attachments/{name}/data":{"get":{"deprecated":false,"description":"Get the (binary) content of one attachment associated with the given instance","parameters":[{"description":"Optional revision of the metadata, to check if its content has changed","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"examples":{},"schema":{"description":"The attachment"}}},"description":"","headers":{"ETag":{"description":"Revision of the attachment, to be used in further `PUT` or `DELETE` operations","schema":{"type":"string"}}}}},"summary":"Get attachment","tags":["Instances"]}},"/instances/{id}/attachments/{name}/info":{"get":{"deprecated":false,"description":"Get all the information about the attachment associated with the given instance","parameters":[{"description":"Optional revision of the attachment, to check if its content has changed","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"JSON object containing the information about the attachment","example":{"CompressedMD5":"26f3fad6ca0c355f02d57c7fa6770248","CompressedSize":526970,"ContentType":1,"UncompressedMD5":"26f3fad6ca0c355f02d57c7fa6770248","UncompressedSize":526970,"Uuid":"b7c99eb7-229f-464e-8f46-6878c8e79e5c"}}}},"description":"","headers":{"ETag":{"description":"Revision of the attachment, to be used in further `PUT` or `DELETE` operations","schema":{"type":"string"}}}}},"summary":"Get info about the attachment","tags":["Instances"]}},"/instances/{id}/attachments/{name}/is-compressed":{"get":{"deprecated":false,"description":"Test whether the attachment has been stored as a compressed file on the disk.","parameters":[{"description":"Optional revision of the attachment, to check if its content has changed","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"examples":{},"schema":{"description":"`0` if the attachment was stored uncompressed, `1` if it was compressed"}}},"description":"","headers":{"ETag":{"description":"Revision of the attachment, to be used in further `PUT` or `DELETE` operations","schema":{"type":"string"}}}}},"summary":"Is attachment compressed?","tags":["Instances"]}},"/instances/{id}/attachments/{name}/md5":{"get":{"deprecated":false,"description":"Get the MD5 hash of one attachment associated with the given instance","parameters":[{"description":"Optional revision of the attachment, to check if its content has changed","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"examples":{},"schema":{"description":"The MD5 of the attachment"}}},"description":"","headers":{"ETag":{"description":"Revision of the attachment, to be used in further `PUT` or `DELETE` operations","schema":{"type":"string"}}}}},"summary":"Get MD5 of attachment","tags":["Instances"]}},"/instances/{id}/attachments/{name}/size":{"get":{"deprecated":false,"description":"Get the size of one attachment associated with the given instance","parameters":[{"description":"Optional revision of the attachment, to check if its content has changed","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"examples":{},"schema":{"description":"The size of the attachment"}}},"description":"","headers":{"ETag":{"description":"Revision of the attachment, to be used in further `PUT` or `DELETE` operations","schema":{"type":"string"}}}}},"summary":"Get size of attachment","tags":["Instances"]}},"/instances/{id}/attachments/{name}/uncompress":{"post":{"deprecated":false,"description":"Change the compression scheme that is used to store an attachment.","parameters":[{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Uncompress attachment","tags":["Instances"]}},"/instances/{id}/attachments/{name}/verify-md5":{"post":{"deprecated":false,"description":"Verify that the attachment is not corrupted, by validating its MD5 hash","parameters":[{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The name of the attachment, or its index (cf. `UserContentType` configuration option)","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{},"schema":{"description":"On success, a valid JSON object is returned"}}},"description":""}},"summary":"Verify attachment","tags":["Instances"]}},"/instances/{id}/content":{"get":{"deprecated":false,"description":"Get the raw content of one DICOM tag in the hierarchy of DICOM dataset","parameters":[{"description":"Path to the DICOM tag. This is the interleaving of one DICOM tag, possibly followed by an index for sequences. Sequences are accessible as, for instance, `/0008-1140/1/0008-1150`","in":"query","name":"...","required":true,"schema":{"type":"string"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"examples":{},"schema":{"description":"The raw value of the tag of intereset (binary data, whose memory layout depends on the underlying transfer syntax), or JSON array containing the list of available tags if accessing a dataset"}}},"description":""}},"summary":"Get raw tag","tags":["Instances"]}},"/instances/{id}/export":{"post":{"deprecated":false,"description":"Write the DICOM file onto the filesystem where Orthanc is running. This is insecure for Orthanc servers that are remotely accessible since one could overwrite any system file. Since Orthanc 1.12.0, this route is disabled by default, but can be enabled using the `RestApiWriteToFileSystemEnabled` configuration option.","parameters":[{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"text/plain":{"schema":{"description":"Target path on the filesystem"}}}},"responses":{"200":{"description":""}},"summary":"Write DICOM onto filesystem","tags":["Instances"]}},"/instances/{id}/file":{"get":{"deprecated":false,"description":"Download one DICOM instance","parameters":[{"description":"This HTTP header can be set to retrieve the DICOM instance in DICOMweb format","in":"header","name":"Accept","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/dicom":{"examples":{},"schema":{"description":"The DICOM instance"}},"application/dicom+json":{"examples":{},"schema":{"description":"The DICOM instance, in DICOMweb JSON format"}},"application/dicom+xml":{"examples":{},"schema":{"description":"The DICOM instance, in DICOMweb XML format"}}},"description":""}},"summary":"Download DICOM","tags":["Instances"]}},"/instances/{id}/frames":{"get":{"deprecated":false,"description":"List the frames that are available in the DICOM instance of interest","parameters":[{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"The list of the indices of the available frames","example":[0]}}},"description":""}},"summary":"List available frames","tags":["Instances"]}},"/instances/{id}/frames/{frame}":{"get":{"deprecated":false,"description":"List the available operations under URI `/instances/{id}/frames/{frame}/`","parameters":[{"description":"","in":"path","name":"frame","required":true,"schema":{"type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"List of the available operations","example":["image-int16","image-uint16","image-uint8","matlab","numpy","preview","raw","raw.gz","rendered"]}}},"description":""}},"summary":"List operations","tags":["Other"]}},"/instances/{id}/frames/{frame}/image-int16":{"get":{"deprecated":false,"description":"Decode one frame of interest from the given DICOM instance. Pixels of grayscale images are truncated to the [-32768,32767] range. Negative values must be interpreted according to two's complement.","parameters":[{"description":"Quality for JPEG images (between 1 and 100, defaults to 90)","in":"query","name":"quality","required":false,"schema":{"type":"number"}},{"description":"Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (defaults to false)","in":"query","name":"returnUnsupportedImage","required":false,"schema":{"type":"boolean"}},{"description":"Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`","in":"header","name":"Accept","required":false,"schema":{"type":"string"}},{"description":"Index of the frame (starts at `0`)","in":"path","name":"frame","required":true,"schema":{"type":"number"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"image/jpeg":{"examples":{},"schema":{"description":"JPEG image"}},"image/png":{"examples":{},"schema":{"description":"PNG image"}},"image/x-portable-arbitrarymap":{"examples":{},"schema":{"description":"PAM image (Portable Arbitrary Map)"}}},"description":""}},"summary":"Decode a frame (int16)","tags":["Instances"]}},"/instances/{id}/frames/{frame}/image-uint16":{"get":{"deprecated":false,"description":"Decode one frame of interest from the given DICOM instance. Pixels of grayscale images are truncated to the [0,65535] range.","parameters":[{"description":"Quality for JPEG images (between 1 and 100, defaults to 90)","in":"query","name":"quality","required":false,"schema":{"type":"number"}},{"description":"Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (defaults to false)","in":"query","name":"returnUnsupportedImage","required":false,"schema":{"type":"boolean"}},{"description":"Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`","in":"header","name":"Accept","required":false,"schema":{"type":"string"}},{"description":"Index of the frame (starts at `0`)","in":"path","name":"frame","required":true,"schema":{"type":"number"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"image/jpeg":{"examples":{},"schema":{"description":"JPEG image"}},"image/png":{"examples":{},"schema":{"description":"PNG image"}},"image/x-portable-arbitrarymap":{"examples":{},"schema":{"description":"PAM image (Portable Arbitrary Map)"}}},"description":""}},"summary":"Decode a frame (uint16)","tags":["Instances"]}},"/instances/{id}/frames/{frame}/image-uint8":{"get":{"deprecated":false,"description":"Decode one frame of interest from the given DICOM instance. Pixels of grayscale images are truncated to the [0,255] range.","parameters":[{"description":"Quality for JPEG images (between 1 and 100, defaults to 90)","in":"query","name":"quality","required":false,"schema":{"type":"number"}},{"description":"Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (defaults to false)","in":"query","name":"returnUnsupportedImage","required":false,"schema":{"type":"boolean"}},{"description":"Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`","in":"header","name":"Accept","required":false,"schema":{"type":"string"}},{"description":"Index of the frame (starts at `0`)","in":"path","name":"frame","required":true,"schema":{"type":"number"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"image/jpeg":{"examples":{},"schema":{"description":"JPEG image"}},"image/png":{"examples":{},"schema":{"description":"PNG image"}},"image/x-portable-arbitrarymap":{"examples":{},"schema":{"description":"PAM image (Portable Arbitrary Map)"}}},"description":""}},"summary":"Decode a frame (uint8)","tags":["Instances"]}},"/instances/{id}/frames/{frame}/matlab":{"get":{"deprecated":false,"description":"Decode one frame of interest from the given DICOM instance, and export this frame as a Octave/Matlab matrix to be imported with `eval()`: https://book.orthanc-server.com/faq/matlab.html","parameters":[{"description":"Index of the frame (starts at `0`)","in":"path","name":"frame","required":true,"schema":{"type":"number"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"examples":{},"schema":{"description":"Octave/Matlab matrix"}}},"description":""}},"summary":"Decode frame for Matlab","tags":["Instances"]}},"/instances/{id}/frames/{frame}/numpy":{"get":{"deprecated":false,"description":"Decode one frame of interest from the given DICOM instance, for use with numpy in Python. The numpy array has 3 dimensions: (height, width, color channel).","parameters":[{"description":"Compress the file as `.npz`","in":"query","name":"compress","required":false,"schema":{"type":"boolean"}},{"description":"On grayscale images, apply the rescaling and return floating-point values","in":"query","name":"rescale","required":false,"schema":{"type":"boolean"}},{"description":"Index of the frame (starts at `0`)","in":"path","name":"frame","required":true,"schema":{"type":"number"}},{"description":"Orthanc identifier of the DICOM resource of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"examples":{},"schema":{"description":"Numpy file: https://numpy.org/devdocs/reference/generated/numpy.lib.format.html"}}},"description":""}},"summary":"Decode frame for numpy","tags":["Instances"]}},"/instances/{id}/frames/{frame}/preview":{"get":{"deprecated":false,"description":"Decode one frame of interest from the given DICOM instance. The full dynamic range of grayscale images is rescaled to the [0,255] range.","parameters":[{"description":"Quality for JPEG images (between 1 and 100, defaults to 90)","in":"query","name":"quality","required":false,"schema":{"type":"number"}},{"description":"Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (defaults to false)","in":"query","name":"returnUnsupportedImage","required":false,"schema":{"type":"boolean"}},{"description":"Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`","in":"header","name":"Accept","required":false,"schema":{"type":"string"}},{"description":"Index of the frame (starts at `0`)","in":"path","name":"frame","required":true,"schema":{"type":"number"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"image/jpeg":{"examples":{},"schema":{"description":"JPEG image"}},"image/png":{"examples":{},"schema":{"description":"PNG image"}},"image/x-portable-arbitrarymap":{"examples":{},"schema":{"description":"PAM image (Portable Arbitrary Map)"}}},"description":""}},"summary":"Decode a frame (preview)","tags":["Instances"]}},"/instances/{id}/frames/{frame}/raw":{"get":{"deprecated":false,"description":"Access the raw content of one individual frame of the DICOM instance of interest, bypassing image decoding. This is notably useful to access the source files in compressed transfer syntaxes.","parameters":[{"description":"Index of the frame (starts at `0`)","in":"path","name":"frame","required":true,"schema":{"type":"number"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"examples":{},"schema":{"description":"The raw frame"}}},"description":""}},"summary":"Access raw frame","tags":["Instances"]}},"/instances/{id}/frames/{frame}/raw.gz":{"get":{"deprecated":false,"description":"Access the raw content of one individual frame of the DICOM instance of interest, bypassing image decoding. This is notably useful to access the source files in compressed transfer syntaxes. The image is compressed using gzip","parameters":[{"description":"Index of the frame (starts at `0`)","in":"path","name":"frame","required":true,"schema":{"type":"number"}},{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/gzip":{"examples":{},"schema":{"description":"The raw frame, compressed using gzip"}}},"description":""}},"summary":"Access raw frame (compressed)","tags":["Instances"]}},"/instances/{id}/frames/{frame}/rendered":{"get":{"deprecated":false,"description":"Render one frame of interest from the given DICOM instance. This function takes scaling into account (`RescaleSlope` and `RescaleIntercept` tags), as well as the default windowing stored in the DICOM file (`WindowCenter` and `WindowWidth`tags), and can be used to resize the resulting image. Color images are not affected by windowing.","parameters":[{"description":"Height of the resized image","in":"query","name":"height","required":false,"schema":{"type":"number"}},{"description":"Quality for JPEG images (between 1 and 100, defaults to 90)","in":"query","name":"quality","required":false,"schema":{"type":"number"}},{"description":"Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (defaults to false)","in":"query","name":"returnUnsupportedImage","required":false,"schema":{"type":"boolean"}},{"description":"Whether to smooth image on resize","in":"query","name":"smooth","required":false,"schema":{"type":"boolean"}},{"description":"Width of the resized image","in":"query","name":"width","required":false,"schema":{"type":"number"}},{"description":"Windowing center","in":"query","name":"window-center","required":false,"schema":{"type":"number"}},{"description":"Windowing width","in":"query","name":"window-width","required":false,"schema":{"type":"number"}},{"description":"Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`","in":"header","name":"Accept","required":false,"schema":{"type":"string"}},{"description":"Index of the frame (starts at `0`)","in":"path","name":"frame","required":true,"schema":{"type":"number"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"image/jpeg":{"examples":{},"schema":{"description":"JPEG image"}},"image/png":{"examples":{},"schema":{"description":"PNG image"}},"image/x-portable-arbitrarymap":{"examples":{},"schema":{"description":"PAM image (Portable Arbitrary Map)"}}},"description":""}},"summary":"Render a frame","tags":["Instances"]}},"/instances/{id}/header":{"get":{"deprecated":false,"description":"Get the DICOM tags in the meta-header of the DICOM instance. By default, the `full` format is used, which combines hexadecimal tags with human-readable description.","parameters":[{"description":"If present, report the DICOM tags in hexadecimal format","in":"query","name":"short","required":false,"schema":{"type":"boolean"}},{"description":"If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)","in":"query","name":"simplify","required":false,"schema":{"type":"boolean"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"JSON object containing the DICOM tags and their associated value","example":{"0002,0000":{"Name":"FileMetaInformationGroupLength","Type":"String","Value":"202"},"0002,0002":{"Name":"MediaStorageSOPClassUID","Type":"String","Value":"1.2.840.10008.5.1.4.1.1.2"},"0002,0003":{"Name":"MediaStorageSOPInstanceUID","Type":"String","Value":"1.3.12.2.1107.5.1.4.54693.30000006100507010800000005269"},"0002,0010":{"Name":"TransferSyntaxUID","Type":"String","Value":"1.2.840.10008.1.2.1"},"0002,0012":{"Name":"ImplementationClassUID","Type":"String","Value":"1.3.6.1.4.1.19291.2.1"},"0002,0013":{"Name":"ImplementationVersionName","Type":"String","Value":"OSIRIX001"},"0002,0016":{"Name":"SourceApplicationEntityTitle","Type":"String","Value":"OSIRIX"}}}}},"description":""}},"summary":"Get DICOM meta-header","tags":["Instances"]}},"/instances/{id}/image-int16":{"get":{"deprecated":false,"description":"Decode the first frame of the given DICOM instance. Pixels of grayscale images are truncated to the [-32768,32767] range. Negative values must be interpreted according to two's complement.","parameters":[{"description":"Quality for JPEG images (between 1 and 100, defaults to 90)","in":"query","name":"quality","required":false,"schema":{"type":"number"}},{"description":"Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (defaults to false)","in":"query","name":"returnUnsupportedImage","required":false,"schema":{"type":"boolean"}},{"description":"Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`","in":"header","name":"Accept","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"image/jpeg":{"examples":{},"schema":{"description":"JPEG image"}},"image/png":{"examples":{},"schema":{"description":"PNG image"}},"image/x-portable-arbitrarymap":{"examples":{},"schema":{"description":"PAM image (Portable Arbitrary Map)"}}},"description":""}},"summary":"Decode an image (int16)","tags":["Instances"]}},"/instances/{id}/image-uint16":{"get":{"deprecated":false,"description":"Decode the first frame of the given DICOM instance. Pixels of grayscale images are truncated to the [0,65535] range.","parameters":[{"description":"Quality for JPEG images (between 1 and 100, defaults to 90)","in":"query","name":"quality","required":false,"schema":{"type":"number"}},{"description":"Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (defaults to false)","in":"query","name":"returnUnsupportedImage","required":false,"schema":{"type":"boolean"}},{"description":"Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`","in":"header","name":"Accept","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"image/jpeg":{"examples":{},"schema":{"description":"JPEG image"}},"image/png":{"examples":{},"schema":{"description":"PNG image"}},"image/x-portable-arbitrarymap":{"examples":{},"schema":{"description":"PAM image (Portable Arbitrary Map)"}}},"description":""}},"summary":"Decode an image (uint16)","tags":["Instances"]}},"/instances/{id}/image-uint8":{"get":{"deprecated":false,"description":"Decode the first frame of the given DICOM instance. Pixels of grayscale images are truncated to the [0,255] range.","parameters":[{"description":"Quality for JPEG images (between 1 and 100, defaults to 90)","in":"query","name":"quality","required":false,"schema":{"type":"number"}},{"description":"Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (defaults to false)","in":"query","name":"returnUnsupportedImage","required":false,"schema":{"type":"boolean"}},{"description":"Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`","in":"header","name":"Accept","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"image/jpeg":{"examples":{},"schema":{"description":"JPEG image"}},"image/png":{"examples":{},"schema":{"description":"PNG image"}},"image/x-portable-arbitrarymap":{"examples":{},"schema":{"description":"PAM image (Portable Arbitrary Map)"}}},"description":""}},"summary":"Decode an image (uint8)","tags":["Instances"]}},"/instances/{id}/labels":{"get":{"deprecated":false,"description":"Get the labels that are associated with the given instance (new in Orthanc 1.12.0)","parameters":[{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{},"schema":{"description":"JSON array containing the names of the labels"}}},"description":""}},"summary":"List labels","tags":["Instances"]}},"/instances/{id}/labels/{label}":{"delete":{"deprecated":false,"description":"Remove a label associated with a instance","parameters":[{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The label to be removed","in":"path","name":"label","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Remove label","tags":["Instances"]},"get":{"deprecated":false,"description":"Test whether the instance is associated with the given label","parameters":[{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The label of interest","in":"path","name":"label","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"examples":{},"schema":{"description":"Empty string is returned in the case of presence, error 404 in the case of absence"}}},"description":""}},"summary":"Test label","tags":["Instances"]},"put":{"deprecated":false,"description":"Associate a label with a instance","parameters":[{"description":"Orthanc identifier of the instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"The label to be added","in":"path","name":"label","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Add label","tags":["Instances"]}},"/instances/{id}/matlab":{"get":{"deprecated":false,"description":"Decode the first frame of the given DICOM instance., and export this frame as a Octave/Matlab matrix to be imported with `eval()`: https://book.orthanc-server.com/faq/matlab.html","parameters":[{"description":"Orthanc identifier of the DICOM instance of interest","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"examples":{},"schema":{"description":"Octave/Matlab matrix"}}},"description":""}},"summary":"Decode frame for Matlab","tags":["Instances"]}},"/instances/{id}/metadata":{"get":{"deprecated":false,"description":"Get the list of metadata that are associated with the given instance","parameters":[{"description":"If present, also retrieve the value of the individual metadata","in":"query","name":"expand","required":false,"schema":{"type":"string"}},{"description":"If present, use the numeric identifier of the metadata instead of its symbolic name","in":"query","name":"numeric","required":false,"schema":{"type":"string"}},{"description":"Orthanc identifier of the instance of i