@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Orthanc API
@base https://orthanc.uclouvain.be/demo/
@version 1.12.11
@endpoints 299
@hint download_for_search
@toc changes(2), exports(2), instances(60), jobs(9), modalities(18), patients(42), peers(8), plugins(3), queries(14), series(42), statistics(1), storage-commitment(2), studies(43), system(1), tools(52)

@group changes
@endpoint DELETE /changes
@desc Clear changes
@returns(200)

@endpoint GET /changes
@desc List changes
@optional {last: num # Request only the last change id (this argument must be used alone), limit: num # Limit the number of results, since: num # Show only the resources since the provided index excluded, to: num # Show only the resources till the provided index included (only available if your DB backend supports ExtendedChanges), type: str # Show only the changes of the provided type (only available if your DB backend supports ExtendedChanges).  Multiple values can be provided and must be separated by a ';'.}
@returns(200) {Changes: [map], Done: bool, First: num, Last: num}

@endgroup

@group exports
@endpoint DELETE /exports
@desc Clear exports
@returns(200)

@endpoint GET /exports
@desc List exports
@optional {limit: num # Limit the number of results, since: num # Show only the resources since the provided index}
@returns(200)

@endgroup

@group instances
@endpoint GET /instances
@desc List the available instances
@optional {expand: str # If present, retrieve detailed information about the individual resources, not only their Orthanc identifiers, full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), limit: num # Limit the number of results, requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., response-content: str # Defines the content of response for each returned resource.  Allowed values are `MainDicomTags`, `Metadata`, `Children`, `Parent`, `Labels`, `Status`, `IsStable`, `IsProtected`, `Attachments`.  If not specified, Orthanc will return `MainDicomTags`, `Metadata`, `Children`, `Parent`, `Labels`, `Status`, `IsStable`, `IsProtected`.e.g: 'response-content=MainDicomTags;Children (new in Orthanc 1.12.5 - overrides `expand`), short: bool # If present, report the DICOM tags in hexadecimal format, since: num # Show only the resources since the provided index}
@returns(200)

@endpoint POST /instances
@desc Upload DICOM instances
@returns(200) {ID: str, ParentPatient: str, ParentSeries: str, ParentStudy: str, Path: str, Status: str}

@endpoint DELETE /instances/{id}
@desc Delete some instance
@required {id: str # Orthanc identifier of the instance of interest}
@returns(200)

@endpoint GET /instances/{id}
@desc Get information about some instance
@required {id: str # Orthanc identifier of the instance of interest}
@optional {full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint POST /instances/{id}/anonymize
@desc Anonymize instance
@required {id: str # Orthanc identifier of the instance of interest}
@optional {DicomVersion: str # Version of the DICOM standard to be used for anonymization. Check out configuration option `DeidentifyLogsDicomVersion` for possible values., Force: bool # Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world, Keep: [str] # 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)., KeepLabels: bool # Keep the labels of all resources level (defaults to `false`), KeepPrivateTags: bool # Keep the private tags from the DICOM instances (defaults to `false`), KeepSource: bool # If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc., LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), PrivateCreator: str # The private creator to be used for private tags in `Replace`, Remove: [str] # 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)., Replace: map # 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)., Transcode: str # Transcode the DICOM instances to the provided DICOM transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html}
@returns(200)

@endpoint GET /instances/{id}/attachments
@desc List attachments
@required {id: str # Orthanc identifier of the instance of interest}
@optional {full: str # If present, retrieve the attachments list and their numerical ids}
@returns(200)

@endpoint DELETE /instances/{id}/attachments/{name}
@desc Delete attachment
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-Match: str # 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`.}
@returns(200)

@endpoint GET /instances/{id}/attachments/{name}
@desc List operations on attachments
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint PUT /instances/{id}/attachments/{name}
@desc Set attachment
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-Match: str # Revision of the attachment, if this is not the first time this attachment is set.}
@returns(200)

@endpoint POST /instances/{id}/attachments/{name}/compress
@desc Compress attachment
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint GET /instances/{id}/attachments/{name}/compressed-data
@desc Get attachment (no decompression)
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), Content-Range: str # Optional content range to access part of the attachment (new in Orthanc 1.12.5), If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /instances/{id}/attachments/{name}/compressed-md5
@desc Get MD5 of attachment on disk
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /instances/{id}/attachments/{name}/compressed-size
@desc Get size of attachment on disk
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /instances/{id}/attachments/{name}/data
@desc Get attachment
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), Content-Range: str # Optional content range to access part of the attachment (new in Orthanc 1.12.5), If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /instances/{id}/attachments/{name}/info
@desc Get info about the attachment
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /instances/{id}/attachments/{name}/is-compressed
@desc Is attachment compressed?
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /instances/{id}/attachments/{name}/md5
@desc Get MD5 of attachment
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /instances/{id}/attachments/{name}/size
@desc Get size of attachment
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint POST /instances/{id}/attachments/{name}/uncompress
@desc Uncompress attachment
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint POST /instances/{id}/attachments/{name}/verify-md5
@desc Verify attachment
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint GET /instances/{id}/content/{path}
@desc Get raw tag
@required {id: str # Orthanc identifier of the DICOM instance of interest, path: str # 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`}
@returns(200)

@endpoint POST /instances/{id}/export
@desc Write DICOM onto filesystem
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@returns(200)

@endpoint GET /instances/{id}/file
@desc Download DICOM
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), lossy-quality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), transcode: str # If present, the DICOM file will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, Accept: str # This HTTP header can be set to retrieve the DICOM instance in DICOMweb format}
@returns(200)

@endpoint GET /instances/{id}/frames
@desc List available frames
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@returns(200)

@endpoint GET /instances/{id}/frames/{frame}
@desc List operations
@required {frame: str, id: str}
@returns(200)

@endpoint GET /instances/{id}/frames/{frame}/image-int16
@desc Decode a frame (int16)
@required {frame: num # Index of the frame (starts at `0`), id: str # Orthanc identifier of the DICOM instance of interest}
@optional {quality: num # Quality for JPEG images (between 1 and 100, defaults to 90), returnUnsupportedImage: bool # Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (value is true if option is present), Accept: str # Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`}
@returns(200)

@endpoint GET /instances/{id}/frames/{frame}/image-uint16
@desc Decode a frame (uint16)
@required {frame: num # Index of the frame (starts at `0`), id: str # Orthanc identifier of the DICOM instance of interest}
@optional {quality: num # Quality for JPEG images (between 1 and 100, defaults to 90), returnUnsupportedImage: bool # Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (value is true if option is present), Accept: str # Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`}
@returns(200)

@endpoint GET /instances/{id}/frames/{frame}/image-uint8
@desc Decode a frame (uint8)
@required {frame: num # Index of the frame (starts at `0`), id: str # Orthanc identifier of the DICOM instance of interest}
@optional {quality: num # Quality for JPEG images (between 1 and 100, defaults to 90), returnUnsupportedImage: bool # Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (value is true if option is present), Accept: str # Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`}
@returns(200)

@endpoint GET /instances/{id}/frames/{frame}/matlab
@desc Decode frame for Matlab
@required {frame: num # Index of the frame (starts at `0`), id: str # Orthanc identifier of the DICOM instance of interest}
@returns(200)

@endpoint GET /instances/{id}/frames/{frame}/numpy
@desc Decode frame for numpy
@required {frame: num # Index of the frame (starts at `0`), id: str # Orthanc identifier of the DICOM resource of interest}
@optional {compress: bool # Compress the file as `.npz`, rescale: bool # On grayscale images, apply the rescaling and return floating-point values}
@returns(200)

@endpoint GET /instances/{id}/frames/{frame}/preview
@desc Decode a frame (preview)
@required {frame: num # Index of the frame (starts at `0`), id: str # Orthanc identifier of the DICOM instance of interest}
@optional {quality: num # Quality for JPEG images (between 1 and 100, defaults to 90), returnUnsupportedImage: bool # Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (value is true if option is present), Accept: str # Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`}
@returns(200)

@endpoint GET /instances/{id}/frames/{frame}/raw
@desc Access raw frame
@required {frame: num # Index of the frame (starts at `0`), id: str # Orthanc identifier of the instance of interest}
@returns(200)

@endpoint GET /instances/{id}/frames/{frame}/raw.gz
@desc Access raw frame (compressed)
@required {frame: num # Index of the frame (starts at `0`), id: str # Orthanc identifier of the instance of interest}
@returns(200)

@endpoint GET /instances/{id}/frames/{frame}/rendered
@desc Render a frame
@required {frame: num # Index of the frame (starts at `0`), id: str # Orthanc identifier of the DICOM instance of interest}
@optional {height: num # Height of the resized image, quality: num # Quality for JPEG images (between 1 and 100, defaults to 90), returnUnsupportedImage: bool # Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (value is true if option is present), smooth: bool # Whether to smooth image on resize, width: num # Width of the resized image, window-center: num # Windowing center, window-width: num # Windowing width, Accept: str # Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`}
@returns(200)

@endpoint GET /instances/{id}/header
@desc Get DICOM meta-header
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@optional {short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /instances/{id}/image-int16
@desc Decode an image (int16)
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@optional {quality: num # Quality for JPEG images (between 1 and 100, defaults to 90), returnUnsupportedImage: bool # Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (value is true if option is present), Accept: str # Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`}
@returns(200)

@endpoint GET /instances/{id}/image-uint16
@desc Decode an image (uint16)
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@optional {quality: num # Quality for JPEG images (between 1 and 100, defaults to 90), returnUnsupportedImage: bool # Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (value is true if option is present), Accept: str # Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`}
@returns(200)

@endpoint GET /instances/{id}/image-uint8
@desc Decode an image (uint8)
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@optional {quality: num # Quality for JPEG images (between 1 and 100, defaults to 90), returnUnsupportedImage: bool # Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (value is true if option is present), Accept: str # Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`}
@returns(200)

@endpoint GET /instances/{id}/labels
@desc List labels
@required {id: str # Orthanc identifier of the instance of interest}
@returns(200)

@endpoint DELETE /instances/{id}/labels/{label}
@desc Remove label
@required {id: str # Orthanc identifier of the instance of interest, label: str # The label to be removed}
@returns(200)

@endpoint GET /instances/{id}/labels/{label}
@desc Test label
@required {id: str # Orthanc identifier of the instance of interest, label: str # The label of interest}
@returns(200)

@endpoint PUT /instances/{id}/labels/{label}
@desc Add label
@required {id: str # Orthanc identifier of the instance of interest, label: str # The label to be added}
@returns(200)

@endpoint GET /instances/{id}/matlab
@desc Decode frame for Matlab
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@returns(200)

@endpoint GET /instances/{id}/metadata
@desc List metadata
@required {id: str # Orthanc identifier of the instance of interest}
@optional {expand: str # If present, also retrieve the value of the individual metadata, numeric: str # If present, use the numeric identifier of the metadata instead of its symbolic name}
@returns(200)

@endpoint DELETE /instances/{id}/metadata/{name}
@desc Delete metadata
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-Match: str # Revision of the metadata, to check if its content has not changed and can be deleted. This header is mandatory if `CheckRevisions` option is `true`.}
@returns(200)

@endpoint GET /instances/{id}/metadata/{name}
@desc Get metadata
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-None-Match: str # Optional revision of the metadata, to check if its content has changed}
@returns(200)

@endpoint PUT /instances/{id}/metadata/{name}
@desc Set metadata
@required {id: str # Orthanc identifier of the instance of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-Match: str # Revision of the metadata, if this is not the first time this metadata is set.}
@returns(200)

@endpoint POST /instances/{id}/modify
@desc Modify instance
@required {id: str # Orthanc identifier of the instance of interest}
@optional {Force: bool # Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world, Keep: [str] # Keep the original value of the specified tags, to be chosen among the `StudyInstanceUID`, `SeriesInstanceUID` and `SOPInstanceUID` tags. Avoid this feature as much as possible, as this breaks the DICOM model of the real world., KeepSource: bool # If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc., LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), PrivateCreator: str # The private creator to be used for private tags in `Replace`, Remove: [str] # List of tags that must 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)., RemovePrivateTags: bool # Remove the private tags from the DICOM instances (defaults to `false`), Replace: map # 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)., Transcode: str # Transcode the DICOM instances to the provided DICOM transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html}
@returns(200)

@endpoint GET /instances/{id}/module
@desc Get instance module
@required {id: str # Orthanc identifier of the instance of interest}
@optional {ignore-length: [str] # Also include the DICOM tags that are provided in this list, even if their associated value is long, short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /instances/{id}/numpy
@desc Decode instance for numpy
@required {id: str # Orthanc identifier of the DICOM resource of interest}
@optional {compress: bool # Compress the file as `.npz`, rescale: bool # On grayscale images, apply the rescaling and return floating-point values}
@returns(200)

@endpoint GET /instances/{id}/patient
@desc Get parent patient
@required {id: str # Orthanc identifier of the instance of interest}
@optional {full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint GET /instances/{id}/pdf
@desc Get embedded PDF
@required {id: str # Orthanc identifier of the instance interest}
@returns(200)

@endpoint GET /instances/{id}/preview
@desc Decode an image (preview)
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@optional {quality: num # Quality for JPEG images (between 1 and 100, defaults to 90), returnUnsupportedImage: bool # Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (value is true if option is present), Accept: str # Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`}
@returns(200)

@endpoint POST /instances/{id}/reconstruct
@desc Reconstruct tags & optionally files of instance
@required {id: str # Orthanc identifier of the instance of interest}
@optional {LimitToThisLevelMainDicomTags: bool # Only reconstruct this level MainDicomTags by re-reading them from a random child instance of the resource. This option is much faster than a full reconstruct and is useful e.g. if you have modified the 'ExtraMainDicomTags' at the Study level to optimize the speed of some C-Find. 'false' by default. (New in Orthanc 1.12.4), ReconstructFiles: bool # Also reconstruct the files of the resources (e.g: apply IngestTranscoding, StorageCompression). 'false' by default. (New in Orthanc 1.11.0)}
@returns(200)

@endpoint GET /instances/{id}/rendered
@desc Render an image
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@optional {height: num # Height of the resized image, quality: num # Quality for JPEG images (between 1 and 100, defaults to 90), returnUnsupportedImage: bool # Returns an unsupported.png placeholder image if unable to provide the image instead of returning a 415 HTTP error (value is true if option is present), smooth: bool # Whether to smooth image on resize, width: num # Width of the resized image, window-center: num # Windowing center, window-width: num # Windowing width, Accept: str # Format of the resulting image. Can be `image/png` (default), `image/jpeg` or `image/x-portable-arbitrarymap`}
@returns(200)

@endpoint GET /instances/{id}/series
@desc Get parent series
@required {id: str # Orthanc identifier of the instance of interest}
@optional {full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint GET /instances/{id}/simplified-tags
@desc Get human-readable tags
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@optional {ignore-length: [str] # Also include the DICOM tags that are provided in this list, even if their associated value is long, whole: bool # Whether to read the whole DICOM file from the storage area (new in Orthanc 1.12.4). If set to "false" (default value), the DICOM file is read until the pixel data tag (7fe0,0010) to optimize access to storage. Setting the option to "true" provides access to the DICOM tags stored after the pixel data tag.}
@returns(200)

@endpoint GET /instances/{id}/statistics
@desc Get instance statistics
@required {id: str # Orthanc identifier of the instance of interest}
@returns(200) {DicomDiskSize: str, DicomDiskSizeMB: num, DicomUncompressedSize: str, DicomUncompressedSizeMB: num, DiskSize: str, DiskSizeMB: num, UncompressedSize: str, UncompressedSizeMB: num}

@endpoint GET /instances/{id}/study
@desc Get parent study
@required {id: str # Orthanc identifier of the instance of interest}
@optional {full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint GET /instances/{id}/tags
@desc Get DICOM tags
@required {id: str # Orthanc identifier of the DICOM instance of interest}
@optional {ignore-length: [str] # Also include the DICOM tags that are provided in this list, even if their associated value is long, short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags), whole: bool # Whether to read the whole DICOM file from the storage area (new in Orthanc 1.12.4). If set to "false" (default value), the DICOM file is read until the pixel data tag (7fe0,0010) to optimize access to storage. Setting the option to "true" provides access to the DICOM tags stored after the pixel data tag.}
@returns(200)

@endgroup

@group jobs
@endpoint GET /jobs
@desc List jobs
@optional {expand: str # If present, retrieve detailed information about the individual jobs}
@returns(200)

@endpoint DELETE /jobs/{id}
@desc Delete a job from history
@required {id: str # Identifier of the job of interest}
@returns(200)

@endpoint GET /jobs/{id}
@desc Get job
@required {id: str # Identifier of the job of interest}
@returns(200)

@endpoint POST /jobs/{id}/cancel
@desc Cancel job
@required {id: str # Identifier of the job of interest}
@returns(200)

@endpoint POST /jobs/{id}/pause
@desc Pause job
@required {id: str # Identifier of the job of interest}
@returns(200)

@endpoint POST /jobs/{id}/resubmit
@desc Resubmit job
@required {id: str # Identifier of the job of interest}
@returns(200)

@endpoint POST /jobs/{id}/resume
@desc Resume job
@required {id: str # Identifier of the job of interest}
@returns(200)

@endpoint DELETE /jobs/{id}/{key}
@desc Delete a job output
@required {id: str # Identifier of the job of interest, key: str # Name of the output of interest}
@returns(200)

@endpoint GET /jobs/{id}/{key}
@desc Get job output
@required {id: str # Identifier of the job of interest, key: str # Name of the output of interest}
@returns(200)

@endgroup

@group modalities
@endpoint GET /modalities
@desc List DICOM modalities
@optional {expand: str # If present, retrieve detailed information about the individual DICOM modalities}
@returns(200)

@endpoint DELETE /modalities/{id}
@desc Delete DICOM modality
@required {id: str # Identifier of the DICOM modality of interest}
@returns(200)

@endpoint GET /modalities/{id}
@desc List operations on modality
@required {id: str # Identifier of the DICOM modality of interest}
@returns(200)

@endpoint PUT /modalities/{id}
@desc Update DICOM modality
@required {id: str # Identifier of the new/updated DICOM modality}
@optional {AET: str # AET of the remote DICOM modality, AllowEcho: bool # Whether to accept C-ECHO SCU commands issued by the remote modality, AllowFind: bool # Whether to accept C-FIND SCU commands issued by the remote modality, AllowFindWorklist: bool # Whether to accept C-FIND SCU commands for worklists issued by the remote modality, AllowGet: bool # Whether to accept C-GET SCU commands issued by the remote modality, AllowMove: bool # Whether to accept C-MOVE SCU commands issued by the remote modality, AllowStorageCommitment: bool # Whether to accept storage commitment requests issued by the remote modality, AllowStore: bool # Whether to accept C-STORE SCU commands issued by the remote modality, AllowTranscoding: bool # Whether to allow transcoding for operations initiated by this modality. This option applies to Orthanc C-GET SCP and to Orthanc C-STORE SCU. It only has an effect if the global option `EnableTranscoding` is set to `true`., Host: str # Host address of the remote DICOM modality (typically, an IP address), LocalAet: str # Whether to override the default DicomAet in the SCU connection initiated by Orthanc to this modality, Manufacturer: str # Manufacturer of the remote DICOM modality (check configuration option `DicomModalities` for possible values, Port: num # TCP port of the remote DICOM modality, Timeout: num # Whether to override the default DicomScuTimeout in the SCU connection initiated by Orthanc to this modality, UseDicomTls: bool # Whether to use DICOM TLS in the SCU connection initiated by Orthanc (new in Orthanc 1.9.0)}
@returns(200)

@endpoint GET /modalities/{id}/configuration
@desc Get modality configuration
@required {id: str # Identifier of the modality of interest}
@returns(200)

@endpoint POST /modalities/{id}/echo
@desc Trigger C-ECHO SCU
@required {id: str # Identifier of the modality of interest}
@optional {CheckFind: bool # Issue a dummy C-FIND command after the C-GET SCU, in order to check whether the remote modality knows about Orthanc. This field defaults to the value of the `DicomEchoChecksFind` configuration option. New in Orthanc 1.8.1., Timeout: num # Timeout for the C-ECHO command, in seconds.  Orthanc will close the DICOM association if no C-ECHO answer is received within this time period.}
@returns(200)

@endpoint POST /modalities/{id}/find
@desc Hierarchical C-FIND SCU
@required {id: str # Identifier of the modality of interest}
@returns(200)

@endpoint POST /modalities/{id}/find-instance
@desc C-FIND SCU for instances
@required {id: str # Identifier of the modality of interest}
@returns(200)

@endpoint POST /modalities/{id}/find-patient
@desc C-FIND SCU for patients
@required {id: str # Identifier of the modality of interest}
@returns(200)

@endpoint POST /modalities/{id}/find-series
@desc C-FIND SCU for series
@required {id: str # Identifier of the modality of interest}
@returns(200)

@endpoint POST /modalities/{id}/find-study
@desc C-FIND SCU for studies
@required {id: str # Identifier of the modality of interest}
@returns(200)

@endpoint POST /modalities/{id}/find-worklist
@desc C-FIND SCU for worklist
@required {id: str # Identifier of the modality of interest}
@optional {Full: bool # If set to `true`, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), Query: map # Associative array containing the filter on the values of the DICOM tags, Short: bool # If set to `true`, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint POST /modalities/{id}/get
@desc Trigger C-GET SCU
@required {id: str # Identifier of the modality of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., Level: str # Level of the query (`Patient`, `Study`, `Series` or `Instance`), LocalAet: str # Local AET that is used for this commands, defaults to `DicomAet` configuration option. Ignored if `DicomModalities` already sets `LocalAet` for this modality., Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, Resources: [map] # List of queries identifying all the DICOM resources to be sent.  Usage of wildcards is prohibited and the query shall only contain DICOM ID tags.  Additionally, you may provide SOPClassesInStudy to limit the scope of the DICOM negotiation to certain SOPClassUID or to present uncommon SOPClassUID during the DICOM negotiation.  By default, Orhanc will propose the most 120 common SOPClassUIDs., Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., Timeout: num # Timeout for the C-GET command, in seconds.  Orthanc will close the DICOM association if no DICOM messages are received within this time period., UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint POST /modalities/{id}/move
@desc Trigger C-MOVE SCU
@required {id: str # Identifier of the modality of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., Level: str # Level of the query (`Patient`, `Study`, `Series` or `Instance`), LocalAet: str # Local AET that is used for this commands, defaults to `DicomAet` configuration option. Ignored if `DicomModalities` already sets `LocalAet` for this modality., Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, Resources: [map] # List of queries identifying all the DICOM resources to be sent, Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., TargetAet: str # Target AET that will be used by the remote DICOM modality as a target for its C-STORE SCU commands, defaults to `DicomAet` configuration option in order to do a simple query/retrieve, Timeout: num # Timeout for the C-MOVE command, in seconds.  Orthanc will close the DICOM association if no DICOM messages (e.g., C-STORE sub-operations or responses) are received within this time period., UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint POST /modalities/{id}/query
@desc Trigger C-FIND SCU
@required {id: str # Identifier of the modality of interest}
@optional {Level: str # Level of the query (`Patient`, `Study`, `Series` or `Instance`), LocalAet: str # Local AET that is used for this commands, defaults to `DicomAet` configuration option. Ignored if `DicomModalities` already sets `LocalAet` for this modality., Normalize: bool # Whether to normalize the query, i.e. whether to wipe out from the query, the DICOM tags that are not applicable for the query-retrieve level of interest, Query: map # Associative array containing the filter on the values of the DICOM tags, Timeout: num # Timeout for the C-FIND command and subsequent C-GET/C-MOVE retrievals, in seconds (new in Orthanc 1.9.1).  Orthanc will close the related DICOM associations if no DICOM messages are received within this time period.}
@returns(200) {ID: str, Path: str}

@endpoint POST /modalities/{id}/storage-commitment
@desc Trigger storage commitment request
@required {id: str # Identifier of the modality of interest}
@optional {DicomInstances: [map] # List of DICOM resources that are not necessarily stored within Orthanc, but that must be checked by storage commitment. This is a list of JSON objects that must contain the `SOPClassUID` and `SOPInstanceUID` fields., Resources: [str] # List of the Orthanc identifiers of the DICOM resources to be checked by storage commitment, Timeout: num # Timeout for the storage commitment command (new in Orthanc 1.9.1)}
@returns(200) {ID: map, Path: map}

@endpoint POST /modalities/{id}/store
@desc Trigger C-STORE SCU
@required {id: str # Identifier of the modality of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., CalledAet: str # Called AET that is used for this commands, defaults to `AET` configuration option. Allows you to overwrite the destination AET for a specific operation., Host: str # Host that is used for this commands, defaults to `Host` configuration option. Allows you to overwrite the destination host for a specific operation., LocalAet: str # Local AET that is used for this commands, defaults to `DicomAet` configuration option. Ignored if `DicomModalities` already sets `LocalAet` for this modality., MoveOriginatorAet: str # Move originator AET that is used for this commands, in order to fake a C-MOVE SCU, MoveOriginatorID: num # Move originator ID that is used for this commands, in order to fake a C-MOVE SCU, Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Port: num # Port that is used for this command, defaults to `Port` configuration option. Allows you to overwrite the destination port for a specific operation., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, Resources: [str] # List of the Orthanc identifiers of all the DICOM resources to be sent, StorageCommitment: bool # Whether to chain C-STORE with DICOM storage commitment to validate the success of the transmission: https://orthanc.uclouvain.be/book/users/storage-commitment.html#chaining-c-store-with-storage-commitment, Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., Timeout: num # Timeout for the C-STORE command, in seconds.  Orthanc will close the DICOM association if no DICOM messages (e.g., C-STORE responses) are received within this time period., UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint POST /modalities/{id}/store-straight
@desc Straight C-STORE SCU
@required {id: str # Identifier of the modality of interest}
@returns(200) {SOPClassUID: str, SOPInstanceUID: str}

@endgroup

@group patients
@endpoint GET /patients
@desc List the available patients
@optional {expand: str # If present, retrieve detailed information about the individual resources, not only their Orthanc identifiers, full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), limit: num # Limit the number of results, requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., response-content: str # Defines the content of response for each returned resource.  Allowed values are `MainDicomTags`, `Metadata`, `Children`, `Parent`, `Labels`, `Status`, `IsStable`, `IsProtected`, `Attachments`.  If not specified, Orthanc will return `MainDicomTags`, `Metadata`, `Children`, `Parent`, `Labels`, `Status`, `IsStable`, `IsProtected`.e.g: 'response-content=MainDicomTags;Children (new in Orthanc 1.12.5 - overrides `expand`), short: bool # If present, report the DICOM tags in hexadecimal format, since: num # Show only the resources since the provided index}
@returns(200)

@endpoint DELETE /patients/{id}
@desc Delete some patient
@required {id: str # Orthanc identifier of the patient of interest}
@returns(200)

@endpoint GET /patients/{id}
@desc Get information about some patient
@required {id: str # Orthanc identifier of the patient of interest}
@optional {full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint POST /patients/{id}/anonymize
@desc Anonymize patient
@required {id: str # Orthanc identifier of the patient of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., DicomVersion: str # Version of the DICOM standard to be used for anonymization. Check out configuration option `DeidentifyLogsDicomVersion` for possible values., Force: bool # Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world, Keep: [str] # 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)., KeepLabels: bool # Keep the labels of all resources level (defaults to `false`), KeepPrivateTags: bool # Keep the private tags from the DICOM instances (defaults to `false`), KeepSource: bool # If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc., LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, PrivateCreator: str # The private creator to be used for private tags in `Replace`, Remove: [str] # 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)., Replace: map # 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)., Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., Transcode: str # Transcode the DICOM instances to the provided DICOM transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint GET /patients/{id}/archive
@desc Create ZIP archive
@required {id: str # Orthanc identifier of the patient of interest}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), lossy-quality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html}
@returns(200)

@endpoint POST /patients/{id}/archive
@desc Create ZIP archive
@required {id: str # Orthanc identifier of the patient of interest}
@optional {Asynchronous: bool # If `true`, create the archive in asynchronous mode, which means that a job is submitted to create the archive in background., Filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in 1.12.7), Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority., Synchronous: bool # If `true`, create the archive in synchronous mode, which means that the HTTP answer will directly contain the ZIP file. This is the default, easy behavior. However, if global configuration option "SynchronousZipStream" is set to "false", asynchronous transfers should be preferred for large amount of data, as the creation of the temporary file might lead to network timeouts., Transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # In asynchronous mode, user data that will be attached to the job., Utf8: bool # If `true`, filenames will be encoded using UTF-8 in the ZIP archive, which may not be supported by your operating system or by your ZIP uncompression software. If `false`, filenames will be encoded using plain ASCII, which was the default in Orthanc <= 1.12.10. Default value is defined by the "ZipUseUtf8" configuration option. (new in 1.12.11)}
@returns(200) {ID: str, Path: str}

@endpoint GET /patients/{id}/attachments
@desc List attachments
@required {id: str # Orthanc identifier of the patient of interest}
@optional {full: str # If present, retrieve the attachments list and their numerical ids}
@returns(200)

@endpoint DELETE /patients/{id}/attachments/{name}
@desc Delete attachment
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-Match: str # 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`.}
@returns(200)

@endpoint GET /patients/{id}/attachments/{name}
@desc List operations on attachments
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint PUT /patients/{id}/attachments/{name}
@desc Set attachment
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-Match: str # Revision of the attachment, if this is not the first time this attachment is set.}
@returns(200)

@endpoint POST /patients/{id}/attachments/{name}/compress
@desc Compress attachment
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint GET /patients/{id}/attachments/{name}/compressed-data
@desc Get attachment (no decompression)
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), Content-Range: str # Optional content range to access part of the attachment (new in Orthanc 1.12.5), If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /patients/{id}/attachments/{name}/compressed-md5
@desc Get MD5 of attachment on disk
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /patients/{id}/attachments/{name}/compressed-size
@desc Get size of attachment on disk
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /patients/{id}/attachments/{name}/data
@desc Get attachment
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), Content-Range: str # Optional content range to access part of the attachment (new in Orthanc 1.12.5), If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /patients/{id}/attachments/{name}/info
@desc Get info about the attachment
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /patients/{id}/attachments/{name}/is-compressed
@desc Is attachment compressed?
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /patients/{id}/attachments/{name}/md5
@desc Get MD5 of attachment
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /patients/{id}/attachments/{name}/size
@desc Get size of attachment
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint POST /patients/{id}/attachments/{name}/uncompress
@desc Uncompress attachment
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint POST /patients/{id}/attachments/{name}/verify-md5
@desc Verify attachment
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint GET /patients/{id}/instances
@desc Get child instances
@required {id: str # Orthanc identifier of the patient of interest}
@optional {expand: str # If false or missing, only retrieve the list of child instances, full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint GET /patients/{id}/instances-tags
@desc Get tags of instances
@required {id: str # Orthanc identifier of the patient of interest}
@optional {ignore-length: [str] # Also include the DICOM tags that are provided in this list, even if their associated value is long, short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /patients/{id}/labels
@desc List labels
@required {id: str # Orthanc identifier of the patient of interest}
@returns(200)

@endpoint DELETE /patients/{id}/labels/{label}
@desc Remove label
@required {id: str # Orthanc identifier of the patient of interest, label: str # The label to be removed}
@returns(200)

@endpoint GET /patients/{id}/labels/{label}
@desc Test label
@required {id: str # Orthanc identifier of the patient of interest, label: str # The label of interest}
@returns(200)

@endpoint PUT /patients/{id}/labels/{label}
@desc Add label
@required {id: str # Orthanc identifier of the patient of interest, label: str # The label to be added}
@returns(200)

@endpoint GET /patients/{id}/media
@desc Create DICOMDIR media
@required {id: str # Orthanc identifier of the patient of interest}
@optional {extended: str # If present, will include additional tags such as `SeriesDescription`, leading to a so-called *extended DICOMDIR*, filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), lossy-quality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html}
@returns(200)

@endpoint POST /patients/{id}/media
@desc Create DICOMDIR media
@required {id: str # Orthanc identifier of the patient of interest}
@optional {Asynchronous: bool # If `true`, create the archive in asynchronous mode, which means that a job is submitted to create the archive in background., Extended: bool # If `true`, will include additional tags such as `SeriesDescription`, leading to a so-called *extended DICOMDIR*. Default value is `false`., Filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in 1.12.7), Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority., Synchronous: bool # If `true`, create the archive in synchronous mode, which means that the HTTP answer will directly contain the ZIP file. This is the default, easy behavior. However, if global configuration option "SynchronousZipStream" is set to "false", asynchronous transfers should be preferred for large amount of data, as the creation of the temporary file might lead to network timeouts., Transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # In asynchronous mode, user data that will be attached to the job., Utf8: bool # If `true`, filenames will be encoded using UTF-8 in the ZIP archive, which may not be supported by your operating system or by your ZIP uncompression software. If `false`, filenames will be encoded using plain ASCII, which was the default in Orthanc <= 1.12.10. Default value is defined by the "ZipUseUtf8" configuration option. (new in 1.12.11)}
@returns(200) {ID: str, Path: str}

@endpoint GET /patients/{id}/metadata
@desc List metadata
@required {id: str # Orthanc identifier of the patient of interest}
@optional {expand: str # If present, also retrieve the value of the individual metadata, numeric: str # If present, use the numeric identifier of the metadata instead of its symbolic name}
@returns(200)

@endpoint DELETE /patients/{id}/metadata/{name}
@desc Delete metadata
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-Match: str # Revision of the metadata, to check if its content has not changed and can be deleted. This header is mandatory if `CheckRevisions` option is `true`.}
@returns(200)

@endpoint GET /patients/{id}/metadata/{name}
@desc Get metadata
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-None-Match: str # Optional revision of the metadata, to check if its content has changed}
@returns(200)

@endpoint PUT /patients/{id}/metadata/{name}
@desc Set metadata
@required {id: str # Orthanc identifier of the patient of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-Match: str # Revision of the metadata, if this is not the first time this metadata is set.}
@returns(200)

@endpoint POST /patients/{id}/modify
@desc Modify patient
@required {id: str # Orthanc identifier of the patient of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., Force: bool # Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world, Keep: [str] # Keep the original value of the specified tags, to be chosen among the `StudyInstanceUID`, `SeriesInstanceUID` and `SOPInstanceUID` tags. Avoid this feature as much as possible, as this breaks the DICOM model of the real world., KeepSource: bool # If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc., LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, PrivateCreator: str # The private creator to be used for private tags in `Replace`, Remove: [str] # List of tags that must 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)., RemovePrivateTags: bool # Remove the private tags from the DICOM instances (defaults to `false`), Replace: map # 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)., Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., Transcode: str # Transcode the DICOM instances to the provided DICOM transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint GET /patients/{id}/module
@desc Get patient module
@required {id: str # Orthanc identifier of the patient of interest}
@optional {ignore-length: [str] # Also include the DICOM tags that are provided in this list, even if their associated value is long, short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /patients/{id}/protected
@desc Is the patient protected against recycling?
@required {id: str # Orthanc identifier of the patient of interest}
@returns(200)

@endpoint PUT /patients/{id}/protected
@desc Protect/Unprotect a patient against recycling
@required {id: str # Orthanc identifier of the patient of interest}
@returns(200)

@endpoint POST /patients/{id}/reconstruct
@desc Reconstruct tags & optionally files of patient
@required {id: str # Orthanc identifier of the patient of interest}
@optional {LimitToThisLevelMainDicomTags: bool # Only reconstruct this level MainDicomTags by re-reading them from a random child instance of the resource. This option is much faster than a full reconstruct and is useful e.g. if you have modified the 'ExtraMainDicomTags' at the Study level to optimize the speed of some C-Find. 'false' by default. (New in Orthanc 1.12.4), ReconstructFiles: bool # Also reconstruct the files of the resources (e.g: apply IngestTranscoding, StorageCompression). 'false' by default. (New in Orthanc 1.11.0)}
@returns(200)

@endpoint GET /patients/{id}/series
@desc Get child series
@required {id: str # Orthanc identifier of the patient of interest}
@optional {expand: str # If false or missing, only retrieve the list of child series, full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint GET /patients/{id}/shared-tags
@desc Get shared tags
@required {id: str # Orthanc identifier of the patient of interest}
@optional {short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /patients/{id}/statistics
@desc Get patient statistics
@required {id: str # Orthanc identifier of the patient of interest}
@returns(200) {CountInstances: num, CountSeries: num, CountStudies: num, DicomDiskSize: str, DicomDiskSizeMB: num, DicomUncompressedSize: str, DicomUncompressedSizeMB: num, DiskSize: str, DiskSizeMB: num, UncompressedSize: str, UncompressedSizeMB: num}

@endpoint GET /patients/{id}/studies
@desc Get child studies
@required {id: str # Orthanc identifier of the patient of interest}
@optional {expand: str # If false or missing, only retrieve the list of child studies, full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endgroup

@group peers
@endpoint GET /peers
@desc List Orthanc peers
@optional {expand: str # If present, retrieve detailed information about the individual Orthanc peers}
@returns(200)

@endpoint DELETE /peers/{id}
@desc Delete Orthanc peer
@required {id: str # Identifier of the Orthanc peer of interest}
@returns(200)

@endpoint GET /peers/{id}
@desc List operations on peer
@required {id: str # Identifier of the peer of interest}
@returns(200)

@endpoint PUT /peers/{id}
@desc Update Orthanc peer
@required {id: str # Identifier of the new/updated Orthanc peer}
@optional {CertificateFile: str # SSL certificate for the HTTPS connections, CertificateKeyFile: str # Key file for the SSL certificate for the HTTPS connections, CertificateKeyPassword: str # Key password for the SSL certificate for the HTTPS connections, HttpHeaders: map # HTTP headers to be used for the connections to the remote peer, Password: str # Password for the credentials, URL: str # URL of the root of the REST API of the remote Orthanc peer, for instance `http://localhost:8042/`, Username: str # Username for the credentials}
@returns(200)

@endpoint GET /peers/{id}/configuration
@desc Get peer configuration
@required {id: str # Identifier of the peer of interest}
@returns(200)

@endpoint POST /peers/{id}/store
@desc Send to Orthanc peer
@required {id: str # Identifier of the modality of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., Compress: bool # Whether to compress the DICOM instances using gzip before the actual sending, Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, Resources: [str] # List of the Orthanc identifiers of all the DICOM resources to be sent, Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., Transcode: str # Transcode to the provided DICOM transfer syntax before the actual sending, UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint POST /peers/{id}/store-straight
@desc Straight store to peer
@required {id: str # Identifier of the modality of interest}
@returns(200) {ID: str, ParentPatient: str, ParentSeries: str, ParentStudy: str, Path: str, Status: str}

@endpoint GET /peers/{id}/system
@desc Get peer system information
@required {id: str # Identifier of the peer of interest}
@returns(200)

@endgroup

@group plugins
@endpoint GET /plugins
@desc List plugins
@returns(200)

@endpoint GET /plugins/explorer.js
@desc JavaScript extensions to Orthanc Explorer
@returns(200)

@endpoint GET /plugins/{id}
@desc Get plugin
@required {id: str # Identifier of the job of interest}
@returns(200)

@endgroup

@group queries
@endpoint GET /queries
@desc List query/retrieve operations
@returns(200)

@endpoint DELETE /queries/{id}
@desc Delete a query
@required {id: str # Identifier of the query of interest}
@returns(200)

@endpoint GET /queries/{id}
@desc List operations on a query
@required {id: str # Identifier of the query of interest}
@returns(200)

@endpoint GET /queries/{id}/answers
@desc List answers to a query
@required {id: str # Identifier of the query of interest}
@optional {expand: str # If present, retrieve detailed information about the individual answers, short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /queries/{id}/answers/{index}
@desc List operations on an answer
@required {id: str # Identifier of the query of interest, index: str # Index of the answer}
@returns(200)

@endpoint GET /queries/{id}/answers/{index}/content
@desc Get one answer
@required {id: str # Identifier of the query of interest, index: str # Index of the answer}
@optional {short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint POST /queries/{id}/answers/{index}/query-instances
@desc Query the child instances of an answer
@required {id: str # Identifier of the query of interest, index: str # Index of the answer}
@optional {Query: map # Associative array containing the filter on the values of the DICOM tags, Timeout: num # Timeout for the C-FIND command, in seconds (new in Orthanc 1.9.1)}
@returns(200) {ID: map, Path: map}

@endpoint POST /queries/{id}/answers/{index}/query-series
@desc Query the child series of an answer
@required {id: str # Identifier of the query of interest, index: str # Index of the answer}
@optional {Query: map # Associative array containing the filter on the values of the DICOM tags, Timeout: num # Timeout for the C-FIND command, in seconds (new in Orthanc 1.9.1)}
@returns(200) {ID: map, Path: map}

@endpoint POST /queries/{id}/answers/{index}/query-studies
@desc Query the child studies of an answer
@required {id: str # Identifier of the query of interest, index: str # Index of the answer}
@optional {Query: map # Associative array containing the filter on the values of the DICOM tags, Timeout: num # Timeout for the C-FIND command, in seconds (new in Orthanc 1.9.1)}
@returns(200) {ID: map, Path: map}

@endpoint POST /queries/{id}/answers/{index}/retrieve
@desc Retrieve one answer with a C-MOVE or a C-GET SCU
@required {id: str # Identifier of the query of interest, index: str # Index of the answer}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., Full: bool # If set to `true`, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, RetrieveMethod: str # Force usage of C-MOVE or C-GET to retrieve the resource.  If note defined in the payload, the retrieve method is defined in the DicomDefaultRetrieveMethod configuration or in DicomModalities->..->RetrieveMethod, Simplify: bool # If set to `true`, report the DICOM tags in human-readable format (using the symbolic name of the tags), Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., TargetAet: str # AET of the target modality. By default, the AET of Orthanc is used, as defined in the `DicomAet` configuration option., Timeout: num # Timeout for the C-MOVE command, in seconds.  Orthanc will close the DICOM association if no DICOM messages (e.g., C-STORE sub-operations or responses) are received within this time period., UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint GET /queries/{id}/level
@desc Get level of original query
@required {id: str # Identifier of the query of interest}
@returns(200)

@endpoint GET /queries/{id}/modality
@desc Get modality of original query
@required {id: str # Identifier of the query of interest}
@returns(200)

@endpoint GET /queries/{id}/query
@desc Get original query arguments
@required {id: str # Identifier of the query of interest}
@optional {short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint POST /queries/{id}/retrieve
@desc Retrieve all answers with C-MOVE SCU
@required {id: str # Identifier of the query of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., Full: bool # If set to `true`, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, RetrieveMethod: str # Force usage of C-MOVE or C-GET to retrieve the resource.  If note defined in the payload, the retrieve method is defined in the DicomDefaultRetrieveMethod configuration or in DicomModalities->..->RetrieveMethod, Simplify: bool # If set to `true`, report the DICOM tags in human-readable format (using the symbolic name of the tags), Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., TargetAet: str # AET of the target modality. By default, the AET of Orthanc is used, as defined in the `DicomAet` configuration option., Timeout: num # Timeout for the C-MOVE command, in seconds.  Orthanc will close the DICOM association if no DICOM messages (e.g., C-STORE sub-operations or responses) are received within this time period., UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endgroup

@group series
@endpoint GET /series
@desc List the available series
@optional {expand: str # If present, retrieve detailed information about the individual resources, not only their Orthanc identifiers, full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), limit: num # Limit the number of results, requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., response-content: str # Defines the content of response for each returned resource.  Allowed values are `MainDicomTags`, `Metadata`, `Children`, `Parent`, `Labels`, `Status`, `IsStable`, `IsProtected`, `Attachments`.  If not specified, Orthanc will return `MainDicomTags`, `Metadata`, `Children`, `Parent`, `Labels`, `Status`, `IsStable`, `IsProtected`.e.g: 'response-content=MainDicomTags;Children (new in Orthanc 1.12.5 - overrides `expand`), short: bool # If present, report the DICOM tags in hexadecimal format, since: num # Show only the resources since the provided index}
@returns(200)

@endpoint DELETE /series/{id}
@desc Delete some series
@required {id: str # Orthanc identifier of the series of interest}
@returns(200)

@endpoint GET /series/{id}
@desc Get information about some series
@required {id: str # Orthanc identifier of the series of interest}
@optional {full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint POST /series/{id}/anonymize
@desc Anonymize series
@required {id: str # Orthanc identifier of the series of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., DicomVersion: str # Version of the DICOM standard to be used for anonymization. Check out configuration option `DeidentifyLogsDicomVersion` for possible values., Force: bool # Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world, Keep: [str] # 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)., KeepLabels: bool # Keep the labels of all resources level (defaults to `false`), KeepPrivateTags: bool # Keep the private tags from the DICOM instances (defaults to `false`), KeepSource: bool # If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc., LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, PrivateCreator: str # The private creator to be used for private tags in `Replace`, Remove: [str] # 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)., Replace: map # 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)., Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., Transcode: str # Transcode the DICOM instances to the provided DICOM transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint GET /series/{id}/archive
@desc Create ZIP archive
@required {id: str # Orthanc identifier of the series of interest}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), lossy-quality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html}
@returns(200)

@endpoint POST /series/{id}/archive
@desc Create ZIP archive
@required {id: str # Orthanc identifier of the series of interest}
@optional {Asynchronous: bool # If `true`, create the archive in asynchronous mode, which means that a job is submitted to create the archive in background., Filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in 1.12.7), Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority., Synchronous: bool # If `true`, create the archive in synchronous mode, which means that the HTTP answer will directly contain the ZIP file. This is the default, easy behavior. However, if global configuration option "SynchronousZipStream" is set to "false", asynchronous transfers should be preferred for large amount of data, as the creation of the temporary file might lead to network timeouts., Transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # In asynchronous mode, user data that will be attached to the job., Utf8: bool # If `true`, filenames will be encoded using UTF-8 in the ZIP archive, which may not be supported by your operating system or by your ZIP uncompression software. If `false`, filenames will be encoded using plain ASCII, which was the default in Orthanc <= 1.12.10. Default value is defined by the "ZipUseUtf8" configuration option. (new in 1.12.11)}
@returns(200) {ID: str, Path: str}

@endpoint GET /series/{id}/attachments
@desc List attachments
@required {id: str # Orthanc identifier of the series of interest}
@optional {full: str # If present, retrieve the attachments list and their numerical ids}
@returns(200)

@endpoint DELETE /series/{id}/attachments/{name}
@desc Delete attachment
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-Match: str # 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`.}
@returns(200)

@endpoint GET /series/{id}/attachments/{name}
@desc List operations on attachments
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint PUT /series/{id}/attachments/{name}
@desc Set attachment
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-Match: str # Revision of the attachment, if this is not the first time this attachment is set.}
@returns(200)

@endpoint POST /series/{id}/attachments/{name}/compress
@desc Compress attachment
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint GET /series/{id}/attachments/{name}/compressed-data
@desc Get attachment (no decompression)
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), Content-Range: str # Optional content range to access part of the attachment (new in Orthanc 1.12.5), If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /series/{id}/attachments/{name}/compressed-md5
@desc Get MD5 of attachment on disk
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /series/{id}/attachments/{name}/compressed-size
@desc Get size of attachment on disk
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /series/{id}/attachments/{name}/data
@desc Get attachment
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), Content-Range: str # Optional content range to access part of the attachment (new in Orthanc 1.12.5), If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /series/{id}/attachments/{name}/info
@desc Get info about the attachment
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /series/{id}/attachments/{name}/is-compressed
@desc Is attachment compressed?
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /series/{id}/attachments/{name}/md5
@desc Get MD5 of attachment
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /series/{id}/attachments/{name}/size
@desc Get size of attachment
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint POST /series/{id}/attachments/{name}/uncompress
@desc Uncompress attachment
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint POST /series/{id}/attachments/{name}/verify-md5
@desc Verify attachment
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint GET /series/{id}/instances
@desc Get child instances
@required {id: str # Orthanc identifier of the series of interest}
@optional {expand: str # If false or missing, only retrieve the list of child instances, full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint GET /series/{id}/instances-tags
@desc Get tags of instances
@required {id: str # Orthanc identifier of the series of interest}
@optional {ignore-length: [str] # Also include the DICOM tags that are provided in this list, even if their associated value is long, short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /series/{id}/labels
@desc List labels
@required {id: str # Orthanc identifier of the series of interest}
@returns(200)

@endpoint DELETE /series/{id}/labels/{label}
@desc Remove label
@required {id: str # Orthanc identifier of the series of interest, label: str # The label to be removed}
@returns(200)

@endpoint GET /series/{id}/labels/{label}
@desc Test label
@required {id: str # Orthanc identifier of the series of interest, label: str # The label of interest}
@returns(200)

@endpoint PUT /series/{id}/labels/{label}
@desc Add label
@required {id: str # Orthanc identifier of the series of interest, label: str # The label to be added}
@returns(200)

@endpoint GET /series/{id}/media
@desc Create DICOMDIR media
@required {id: str # Orthanc identifier of the series of interest}
@optional {extended: str # If present, will include additional tags such as `SeriesDescription`, leading to a so-called *extended DICOMDIR*, filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), lossy-quality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html}
@returns(200)

@endpoint POST /series/{id}/media
@desc Create DICOMDIR media
@required {id: str # Orthanc identifier of the series of interest}
@optional {Asynchronous: bool # If `true`, create the archive in asynchronous mode, which means that a job is submitted to create the archive in background., Extended: bool # If `true`, will include additional tags such as `SeriesDescription`, leading to a so-called *extended DICOMDIR*. Default value is `false`., Filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in 1.12.7), Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority., Synchronous: bool # If `true`, create the archive in synchronous mode, which means that the HTTP answer will directly contain the ZIP file. This is the default, easy behavior. However, if global configuration option "SynchronousZipStream" is set to "false", asynchronous transfers should be preferred for large amount of data, as the creation of the temporary file might lead to network timeouts., Transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # In asynchronous mode, user data that will be attached to the job., Utf8: bool # If `true`, filenames will be encoded using UTF-8 in the ZIP archive, which may not be supported by your operating system or by your ZIP uncompression software. If `false`, filenames will be encoded using plain ASCII, which was the default in Orthanc <= 1.12.10. Default value is defined by the "ZipUseUtf8" configuration option. (new in 1.12.11)}
@returns(200) {ID: str, Path: str}

@endpoint GET /series/{id}/metadata
@desc List metadata
@required {id: str # Orthanc identifier of the series of interest}
@optional {expand: str # If present, also retrieve the value of the individual metadata, numeric: str # If present, use the numeric identifier of the metadata instead of its symbolic name}
@returns(200)

@endpoint DELETE /series/{id}/metadata/{name}
@desc Delete metadata
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-Match: str # Revision of the metadata, to check if its content has not changed and can be deleted. This header is mandatory if `CheckRevisions` option is `true`.}
@returns(200)

@endpoint GET /series/{id}/metadata/{name}
@desc Get metadata
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-None-Match: str # Optional revision of the metadata, to check if its content has changed}
@returns(200)

@endpoint PUT /series/{id}/metadata/{name}
@desc Set metadata
@required {id: str # Orthanc identifier of the series of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-Match: str # Revision of the metadata, if this is not the first time this metadata is set.}
@returns(200)

@endpoint POST /series/{id}/modify
@desc Modify series
@required {id: str # Orthanc identifier of the series of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., Force: bool # Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world, Keep: [str] # Keep the original value of the specified tags, to be chosen among the `StudyInstanceUID`, `SeriesInstanceUID` and `SOPInstanceUID` tags. Avoid this feature as much as possible, as this breaks the DICOM model of the real world., KeepSource: bool # If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc., LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, PrivateCreator: str # The private creator to be used for private tags in `Replace`, Remove: [str] # List of tags that must 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)., RemovePrivateTags: bool # Remove the private tags from the DICOM instances (defaults to `false`), Replace: map # 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)., Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., Transcode: str # Transcode the DICOM instances to the provided DICOM transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint GET /series/{id}/module
@desc Get series module
@required {id: str # Orthanc identifier of the series of interest}
@optional {ignore-length: [str] # Also include the DICOM tags that are provided in this list, even if their associated value is long, short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /series/{id}/numpy
@desc Decode series for numpy
@required {id: str # Orthanc identifier of the DICOM resource of interest}
@optional {compress: bool # Compress the file as `.npz`, rescale: bool # On grayscale images, apply the rescaling and return floating-point values}
@returns(200)

@endpoint GET /series/{id}/ordered-slices
@desc Order the slices
@required {id: str # Orthanc identifier of the series of interest}
@returns(200) {Dicom: [str], Slices: [str], SlicesShort: [map], Type: str}

@endpoint GET /series/{id}/patient
@desc Get parent patient
@required {id: str # Orthanc identifier of the series of interest}
@optional {full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint POST /series/{id}/reconstruct
@desc Reconstruct tags & optionally files of series
@required {id: str # Orthanc identifier of the series of interest}
@optional {LimitToThisLevelMainDicomTags: bool # Only reconstruct this level MainDicomTags by re-reading them from a random child instance of the resource. This option is much faster than a full reconstruct and is useful e.g. if you have modified the 'ExtraMainDicomTags' at the Study level to optimize the speed of some C-Find. 'false' by default. (New in Orthanc 1.12.4), ReconstructFiles: bool # Also reconstruct the files of the resources (e.g: apply IngestTranscoding, StorageCompression). 'false' by default. (New in Orthanc 1.11.0)}
@returns(200)

@endpoint GET /series/{id}/shared-tags
@desc Get shared tags
@required {id: str # Orthanc identifier of the series of interest}
@optional {short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /series/{id}/statistics
@desc Get series statistics
@required {id: str # Orthanc identifier of the series of interest}
@returns(200) {CountInstances: num, DicomDiskSize: str, DicomDiskSizeMB: num, DicomUncompressedSize: str, DicomUncompressedSizeMB: num, DiskSize: str, DiskSizeMB: num, UncompressedSize: str, UncompressedSizeMB: num}

@endpoint GET /series/{id}/study
@desc Get parent study
@required {id: str # Orthanc identifier of the series of interest}
@optional {full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endgroup

@group statistics
@endpoint GET /statistics
@desc Get database statistics
@returns(200) {CountInstances: num, CountPatients: num, CountSeries: num, CountStudies: num, TotalDiskSize: str, TotalDiskSizeMB: num, TotalUncompressedSize: str, TotalUncompressedSizeMB: num}

@endgroup

@group storage-commitment
@endpoint GET /storage-commitment/{id}
@desc Get storage commitment report
@required {id: str # Identifier of the storage commitment report}
@returns(200) {Failures: [map], RemoteAET: str, Status: str, Success: [map]}

@endpoint POST /storage-commitment/{id}/remove
@desc Remove after storage commitment
@required {id: str # Identifier of the storage commitment report}
@returns(200)

@endgroup

@group studies
@endpoint GET /studies
@desc List the available studies
@optional {expand: str # If present, retrieve detailed information about the individual resources, not only their Orthanc identifiers, full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), limit: num # Limit the number of results, requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., response-content: str # Defines the content of response for each returned resource.  Allowed values are `MainDicomTags`, `Metadata`, `Children`, `Parent`, `Labels`, `Status`, `IsStable`, `IsProtected`, `Attachments`.  If not specified, Orthanc will return `MainDicomTags`, `Metadata`, `Children`, `Parent`, `Labels`, `Status`, `IsStable`, `IsProtected`.e.g: 'response-content=MainDicomTags;Children (new in Orthanc 1.12.5 - overrides `expand`), short: bool # If present, report the DICOM tags in hexadecimal format, since: num # Show only the resources since the provided index}
@returns(200)

@endpoint DELETE /studies/{id}
@desc Delete some study
@required {id: str # Orthanc identifier of the study of interest}
@returns(200)

@endpoint GET /studies/{id}
@desc Get information about some study
@required {id: str # Orthanc identifier of the study of interest}
@optional {full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint POST /studies/{id}/anonymize
@desc Anonymize study
@required {id: str # Orthanc identifier of the study of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., DicomVersion: str # Version of the DICOM standard to be used for anonymization. Check out configuration option `DeidentifyLogsDicomVersion` for possible values., Force: bool # Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world, Keep: [str] # 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)., KeepLabels: bool # Keep the labels of all resources level (defaults to `false`), KeepPrivateTags: bool # Keep the private tags from the DICOM instances (defaults to `false`), KeepSource: bool # If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc., LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, PrivateCreator: str # The private creator to be used for private tags in `Replace`, Remove: [str] # 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)., Replace: map # 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)., Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., Transcode: str # Transcode the DICOM instances to the provided DICOM transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint GET /studies/{id}/archive
@desc Create ZIP archive
@required {id: str # Orthanc identifier of the study of interest}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), lossy-quality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html}
@returns(200)

@endpoint POST /studies/{id}/archive
@desc Create ZIP archive
@required {id: str # Orthanc identifier of the study of interest}
@optional {Asynchronous: bool # If `true`, create the archive in asynchronous mode, which means that a job is submitted to create the archive in background., Filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in 1.12.7), Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority., Synchronous: bool # If `true`, create the archive in synchronous mode, which means that the HTTP answer will directly contain the ZIP file. This is the default, easy behavior. However, if global configuration option "SynchronousZipStream" is set to "false", asynchronous transfers should be preferred for large amount of data, as the creation of the temporary file might lead to network timeouts., Transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # In asynchronous mode, user data that will be attached to the job., Utf8: bool # If `true`, filenames will be encoded using UTF-8 in the ZIP archive, which may not be supported by your operating system or by your ZIP uncompression software. If `false`, filenames will be encoded using plain ASCII, which was the default in Orthanc <= 1.12.10. Default value is defined by the "ZipUseUtf8" configuration option. (new in 1.12.11)}
@returns(200) {ID: str, Path: str}

@endpoint GET /studies/{id}/attachments
@desc List attachments
@required {id: str # Orthanc identifier of the study of interest}
@optional {full: str # If present, retrieve the attachments list and their numerical ids}
@returns(200)

@endpoint DELETE /studies/{id}/attachments/{name}
@desc Delete attachment
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-Match: str # 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`.}
@returns(200)

@endpoint GET /studies/{id}/attachments/{name}
@desc List operations on attachments
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint PUT /studies/{id}/attachments/{name}
@desc Set attachment
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-Match: str # Revision of the attachment, if this is not the first time this attachment is set.}
@returns(200)

@endpoint POST /studies/{id}/attachments/{name}/compress
@desc Compress attachment
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint GET /studies/{id}/attachments/{name}/compressed-data
@desc Get attachment (no decompression)
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), Content-Range: str # Optional content range to access part of the attachment (new in Orthanc 1.12.5), If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /studies/{id}/attachments/{name}/compressed-md5
@desc Get MD5 of attachment on disk
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /studies/{id}/attachments/{name}/compressed-size
@desc Get size of attachment on disk
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /studies/{id}/attachments/{name}/data
@desc Get attachment
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), Content-Range: str # Optional content range to access part of the attachment (new in Orthanc 1.12.5), If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /studies/{id}/attachments/{name}/info
@desc Get info about the attachment
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /studies/{id}/attachments/{name}/is-compressed
@desc Is attachment compressed?
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /studies/{id}/attachments/{name}/md5
@desc Get MD5 of attachment
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint GET /studies/{id}/attachments/{name}/size
@desc Get size of attachment
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@optional {If-None-Match: str # Optional revision of the attachment, to check if its content has changed}
@returns(200)

@endpoint POST /studies/{id}/attachments/{name}/uncompress
@desc Uncompress attachment
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint POST /studies/{id}/attachments/{name}/verify-md5
@desc Verify attachment
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the attachment, or its index (cf. `UserContentType` configuration option)}
@returns(200)

@endpoint GET /studies/{id}/instances
@desc Get child instances
@required {id: str # Orthanc identifier of the study of interest}
@optional {expand: str # If false or missing, only retrieve the list of child instances, full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint GET /studies/{id}/instances-tags
@desc Get tags of instances
@required {id: str # Orthanc identifier of the study of interest}
@optional {ignore-length: [str] # Also include the DICOM tags that are provided in this list, even if their associated value is long, short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /studies/{id}/labels
@desc List labels
@required {id: str # Orthanc identifier of the study of interest}
@returns(200)

@endpoint DELETE /studies/{id}/labels/{label}
@desc Remove label
@required {id: str # Orthanc identifier of the study of interest, label: str # The label to be removed}
@returns(200)

@endpoint GET /studies/{id}/labels/{label}
@desc Test label
@required {id: str # Orthanc identifier of the study of interest, label: str # The label of interest}
@returns(200)

@endpoint PUT /studies/{id}/labels/{label}
@desc Add label
@required {id: str # Orthanc identifier of the study of interest, label: str # The label to be added}
@returns(200)

@endpoint GET /studies/{id}/media
@desc Create DICOMDIR media
@required {id: str # Orthanc identifier of the study of interest}
@optional {extended: str # If present, will include additional tags such as `SeriesDescription`, leading to a so-called *extended DICOMDIR*, filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), lossy-quality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html}
@returns(200)

@endpoint POST /studies/{id}/media
@desc Create DICOMDIR media
@required {id: str # Orthanc identifier of the study of interest}
@optional {Asynchronous: bool # If `true`, create the archive in asynchronous mode, which means that a job is submitted to create the archive in background., Extended: bool # If `true`, will include additional tags such as `SeriesDescription`, leading to a so-called *extended DICOMDIR*. Default value is `false`., Filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in 1.12.7), Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority., Synchronous: bool # If `true`, create the archive in synchronous mode, which means that the HTTP answer will directly contain the ZIP file. This is the default, easy behavior. However, if global configuration option "SynchronousZipStream" is set to "false", asynchronous transfers should be preferred for large amount of data, as the creation of the temporary file might lead to network timeouts., Transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # In asynchronous mode, user data that will be attached to the job., Utf8: bool # If `true`, filenames will be encoded using UTF-8 in the ZIP archive, which may not be supported by your operating system or by your ZIP uncompression software. If `false`, filenames will be encoded using plain ASCII, which was the default in Orthanc <= 1.12.10. Default value is defined by the "ZipUseUtf8" configuration option. (new in 1.12.11)}
@returns(200) {ID: str, Path: str}

@endpoint POST /studies/{id}/merge
@desc Merge study
@required {id: str # Orthanc identifier of the study of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., KeepSource: bool # If set to `true`, instructs Orthanc to keep a copy of the original resources in their source study. By default, the original resources are deleted from Orthanc., Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, Resources: [str] # The list of DICOM resources (studies, series, and/or instances) to be merged into the study of interest (mandatory option), Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint GET /studies/{id}/metadata
@desc List metadata
@required {id: str # Orthanc identifier of the study of interest}
@optional {expand: str # If present, also retrieve the value of the individual metadata, numeric: str # If present, use the numeric identifier of the metadata instead of its symbolic name}
@returns(200)

@endpoint DELETE /studies/{id}/metadata/{name}
@desc Delete metadata
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-Match: str # Revision of the metadata, to check if its content has not changed and can be deleted. This header is mandatory if `CheckRevisions` option is `true`.}
@returns(200)

@endpoint GET /studies/{id}/metadata/{name}
@desc Get metadata
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-None-Match: str # Optional revision of the metadata, to check if its content has changed}
@returns(200)

@endpoint PUT /studies/{id}/metadata/{name}
@desc Set metadata
@required {id: str # Orthanc identifier of the study of interest, name: str # The name of the metadata, or its index (cf. `UserMetadata` configuration option)}
@optional {If-Match: str # Revision of the metadata, if this is not the first time this metadata is set.}
@returns(200)

@endpoint POST /studies/{id}/modify
@desc Modify study
@required {id: str # Orthanc identifier of the study of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., Force: bool # Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world, Keep: [str] # Keep the original value of the specified tags, to be chosen among the `StudyInstanceUID`, `SeriesInstanceUID` and `SOPInstanceUID` tags. Avoid this feature as much as possible, as this breaks the DICOM model of the real world., KeepSource: bool # If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc., LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, PrivateCreator: str # The private creator to be used for private tags in `Replace`, Remove: [str] # List of tags that must 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)., RemovePrivateTags: bool # Remove the private tags from the DICOM instances (defaults to `false`), Replace: map # 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)., Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., Transcode: str # Transcode the DICOM instances to the provided DICOM transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint GET /studies/{id}/module
@desc Get study module
@required {id: str # Orthanc identifier of the study of interest}
@optional {ignore-length: [str] # Also include the DICOM tags that are provided in this list, even if their associated value is long, short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /studies/{id}/module-patient
@desc Get patient module of study
@required {id: str # Orthanc identifier of the study of interest}
@optional {ignore-length: [str] # Also include the DICOM tags that are provided in this list, even if their associated value is long, short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint GET /studies/{id}/patient
@desc Get parent patient
@required {id: str # Orthanc identifier of the study of interest}
@optional {full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint POST /studies/{id}/reconstruct
@desc Reconstruct tags & optionally files of study
@required {id: str # Orthanc identifier of the study of interest}
@optional {LimitToThisLevelMainDicomTags: bool # Only reconstruct this level MainDicomTags by re-reading them from a random child instance of the resource. This option is much faster than a full reconstruct and is useful e.g. if you have modified the 'ExtraMainDicomTags' at the Study level to optimize the speed of some C-Find. 'false' by default. (New in Orthanc 1.12.4), ReconstructFiles: bool # Also reconstruct the files of the resources (e.g: apply IngestTranscoding, StorageCompression). 'false' by default. (New in Orthanc 1.11.0)}
@returns(200)

@endpoint GET /studies/{id}/series
@desc Get child series
@required {id: str # Orthanc identifier of the study of interest}
@optional {expand: str # If false or missing, only retrieve the list of child series, full: bool # If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), requested-tags: str # 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: 'requested-tags=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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., short: bool # If present, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint GET /studies/{id}/shared-tags
@desc Get shared tags
@required {id: str # Orthanc identifier of the study of interest}
@optional {short: bool # If present, report the DICOM tags in hexadecimal format, simplify: bool # If present, report the DICOM tags in human-readable format (using the symbolic name of the tags)}
@returns(200)

@endpoint POST /studies/{id}/split
@desc Split study
@required {id: str # Orthanc identifier of the study of interest}
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., Instances: [str] # The list of instances to be separated from the parent study. These instances must all be children of the same source study, that is specified in the URI., KeepLabels: bool # Keep the labels of all resources level (defaults to `false`), KeepSource: bool # If set to `true`, instructs Orthanc to keep a copy of the original series/instances in the source study. By default, the original series/instances are deleted from Orthanc., Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, Remove: [str] # List of tags that must be removed in the new study (from the same modules as in the `Replace` option), Replace: map # Associative array to change the value of some DICOM tags in the new study. These tags must be part of the "Patient Module Attributes" or the "General Study Module Attributes", as specified by the DICOM 2011 standard in Tables C.7-1 and C.7-3., Series: [str] # The list of series to be separated from the parent study. These series must all be children of the same source study, that is specified in the URI., Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint GET /studies/{id}/statistics
@desc Get study statistics
@required {id: str # Orthanc identifier of the study of interest}
@returns(200) {CountInstances: num, CountSeries: num, DicomDiskSize: str, DicomDiskSizeMB: num, DicomUncompressedSize: str, DicomUncompressedSizeMB: num, DiskSize: str, DiskSizeMB: num, UncompressedSize: str, UncompressedSizeMB: num}

@endgroup

@group system
@endpoint GET /system
@desc Get system information
@returns(200) {ApiVersion: num, Capabilities: map, CheckRevisions: bool, DatabaseBackendPlugin: str, DatabaseServerIdentifier: str, DatabaseVersion: num, DicomAet: str, DicomDefaultRetrieveMethod: str, DicomPort: num, HasLabels: bool, HttpPort: num, IngestTranscoding: str, IsHttpServerSecure: bool, MainDicomTags: map, MaximumPatientCount: num, MaximumStorageMode: str, MaximumStorageSize: num, Name: str, OverwriteInstances: bool, PatientLevelEnabled: bool, PluginsEnabled: bool, ReadOnly: bool, StorageAreaPlugin: str, StorageCompression: bool, UserMetadata: map, Version: str}

@endgroup

@group tools
@endpoint GET /tools
@desc List operations
@returns(200)

@endpoint GET /tools/accepted-sop-classes
@desc Get accepted SOPClassUID
@returns(200)

@endpoint GET /tools/accepted-transfer-syntaxes
@desc Get accepted transfer syntaxes
@returns(200)

@endpoint PUT /tools/accepted-transfer-syntaxes
@desc Set accepted transfer syntaxes
@returns(200)

@endpoint POST /tools/bulk-anonymize
@desc Anonymize a set of resources
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., DicomVersion: str # Version of the DICOM standard to be used for anonymization. Check out configuration option `DeidentifyLogsDicomVersion` for possible values., Force: bool # Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world, Keep: [str] # 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)., KeepLabels: bool # Keep the labels of all resources level (defaults to `false`), KeepPrivateTags: bool # Keep the private tags from the DICOM instances (defaults to `false`), KeepSource: bool # If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc., LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, PrivateCreator: str # The private creator to be used for private tags in `Replace`, Remove: [str] # 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)., Replace: map # 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)., Resources: [str] # List of the Orthanc identifiers of the patients/studies/series/instances of interest., Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., Transcode: str # Transcode the DICOM instances to the provided DICOM transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint POST /tools/bulk-content
@desc Describe a set of resources
@optional {Full: bool # If set to `true`, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), Level: str # This optional argument specifies the level of interest (can be `Patient`, `Study`, `Series` or `Instance`). Orthanc will loop over the items inside `Resources`, and explore upward or downward in the DICOM hierarchy in order to find the level of interest., Metadata: bool # If set to `true` (default value), the metadata associated with the resources will also be retrieved., Resources: [str] # List of the Orthanc identifiers of the patients/studies/series/instances of interest., Short: bool # If set to `true`, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint POST /tools/bulk-delete
@desc Delete a set of resources
@optional {Resources: [str] # List of the Orthanc identifiers of the patients/studies/series/instances of interest.}
@returns(200)

@endpoint POST /tools/bulk-modify
@desc Modify a set of resources
@optional {Asynchronous: bool # If `true`, run the job in asynchronous mode, which means that the REST API call will immediately return, reporting the identifier of a job. Prefer this flavor wherever possible., Force: bool # Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world, Keep: [str] # Keep the original value of the specified tags, to be chosen among the `StudyInstanceUID`, `SeriesInstanceUID` and `SOPInstanceUID` tags. Avoid this feature as much as possible, as this breaks the DICOM model of the real world., KeepSource: bool # If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc., Level: str # Level of the modification (`Patient`, `Study`, `Series` or `Instance`). If absent, the level defaults to `Instance`, but is set to `Patient` if `PatientID` is modified, to `Study` if `StudyInstanceUID` is modified, or to `Series` if `SeriesInstancesUID` is modified. (new in Orthanc 1.9.7), LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), Permissive: bool # If `true`, ignore errors during the individual steps of the job.  Default value is `false`., Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority.  Default value is `0`, PrivateCreator: str # The private creator to be used for private tags in `Replace`, Remove: [str] # List of tags that must 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)., RemovePrivateTags: bool # Remove the private tags from the DICOM instances (defaults to `false`), Replace: map # 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)., Resources: [str] # List of the Orthanc identifiers of the patients/studies/series/instances of interest., Synchronous: bool # If `true`, run the job in synchronous mode, which means that the HTTP answer will directly contain the result of the job. This is the default, easy behavior, but it is *not* desirable for long jobs, as it might lead to network timeouts., Transcode: str # Transcode the DICOM instances to the provided DICOM transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # User data that will travel along with the job.}
@returns(200) {ID: str, Path: str}

@endpoint POST /tools/count-resources
@desc Count local resources
@optional {Full: bool # If set to `true`, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), Labels: [str] # List of strings specifying which labels to look for in the resources (new in Orthanc 1.12.0), LabelsConstraint: str # Constraint on the labels, can be `All`, `Any`, or `None` (defaults to `All`, new in Orthanc 1.12.0). From 1.12.11: using `None` together with an empty list of labels looks for the resources that do not have any labels attached., Level: str # Level of the query (`Patient`, `Study`, `Series` or `Instance`), MetadataQuery: map # Associative array containing the filter on the values of the metadata (new in Orthanc 1.12.5), ParentPatient: str # Limit the reported resources to descendants of this patient (new in Orthanc 1.12.5), ParentSeries: str # Limit the reported resources to descendants of this series (new in Orthanc 1.12.5), ParentStudy: str # Limit the reported resources to descendants of this study (new in Orthanc 1.12.5), Query: map # Associative array containing the filter on the values of the DICOM tags, Short: bool # If set to `true`, report the DICOM tags in hexadecimal format}
@returns(200)

@endpoint GET /tools/create-archive
@desc Create ZIP archive
@required {resources: str # A comma separated list of Orthanc resource identifiers to include in the ZIP archive.}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), lossy-quality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), transcode: str # If present, the DICOM files will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html}
@returns(200)

@endpoint POST /tools/create-archive
@desc Create ZIP archive
@optional {Asynchronous: bool # If `true`, create the archive in asynchronous mode, which means that a job is submitted to create the archive in background., Filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in 1.12.7), Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority., Resources: [str] # The list of Orthanc identifiers of interest., Synchronous: bool # If `true`, create the archive in synchronous mode, which means that the HTTP answer will directly contain the ZIP file. This is the default, easy behavior. However, if global configuration option "SynchronousZipStream" is set to "false", asynchronous transfers should be preferred for large amount of data, as the creation of the temporary file might lead to network timeouts., Transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # In asynchronous mode, user data that will be attached to the job., Utf8: bool # If `true`, filenames will be encoded using UTF-8 in the ZIP archive, which may not be supported by your operating system or by your ZIP uncompression software. If `false`, filenames will be encoded using plain ASCII, which was the default in Orthanc <= 1.12.10. Default value is defined by the "ZipUseUtf8" configuration option. (new in 1.12.11)}
@returns(200) {ID: str, Path: str}

@endpoint POST /tools/create-dicom
@desc Create one DICOM instance
@optional {Content: str # This field can be used to embed an image (pixel data encoded as PNG or JPEG), a PDF, or a 3D manufactoring model (MTL/OBJ/STL) inside the created DICOM instance. The file to be encapsulated must be provided using its [data URI scheme encoding](https://en.wikipedia.org/wiki/Data_URI_scheme). This field can possibly contain a JSON array, in which case a DICOM series is created containing one DICOM instance for each item in the `Content` field., Encapsulate: bool # If set to `true`, encapsulate the binary data of `ContentData` as such, using a compressed transfer syntax. Only applicable if `ContentData` contains a grayscale or color JPEG image in 8bpp, in which case the transfer syntax is set to "1.2.840.10008.1.2.4.50". (new in Orthanc 1.12.7), Force: bool # Avoid the consistency checks for the DICOM tags that enforce the DICOM model of the real-world. You can notably use this flag if you need to manually set the tags `StudyInstanceUID`, `SeriesInstanceUID`, or `SOPInstanceUID`. Be careful with this feature., InterpretBinaryTags: bool # If some value in the `Tags` associative array is formatted according to some [data URI scheme encoding](https://en.wikipedia.org/wiki/Data_URI_scheme), whether this value is decoded to a binary value or kept as such (`true` by default), Parent: str # If present, the newly created instance will be attached to the parent DICOM resource whose Orthanc identifier is contained in this field. The DICOM tags of the parent modules in the DICOM hierarchy will be automatically copied to the newly created instance., PrivateCreator: str # The private creator to be used for private tags in `Tags`, Tags: map # Associative array containing the tags of the new instance to be created}
@returns(200) {ID: str, Path: str}

@endpoint GET /tools/create-media
@desc Create DICOMDIR media
@required {resources: str # A comma separated list of Orthanc resource identifiers to include in the DICOMDIR media.}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), lossy-quality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), transcode: str # If present, the DICOM files will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html}
@returns(200)

@endpoint POST /tools/create-media
@desc Create DICOMDIR media
@optional {Asynchronous: bool # If `true`, create the archive in asynchronous mode, which means that a job is submitted to create the archive in background., Extended: bool # If `true`, will include additional tags such as `SeriesDescription`, leading to a so-called *extended DICOMDIR*. Default value is `false`., Filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in 1.12.7), Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority., Resources: [str] # The list of Orthanc identifiers of interest., Synchronous: bool # If `true`, create the archive in synchronous mode, which means that the HTTP answer will directly contain the ZIP file. This is the default, easy behavior. However, if global configuration option "SynchronousZipStream" is set to "false", asynchronous transfers should be preferred for large amount of data, as the creation of the temporary file might lead to network timeouts., Transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # In asynchronous mode, user data that will be attached to the job., Utf8: bool # If `true`, filenames will be encoded using UTF-8 in the ZIP archive, which may not be supported by your operating system or by your ZIP uncompression software. If `false`, filenames will be encoded using plain ASCII, which was the default in Orthanc <= 1.12.10. Default value is defined by the "ZipUseUtf8" configuration option. (new in 1.12.11)}
@returns(200) {ID: str, Path: str}

@endpoint GET /tools/create-media-extended
@desc Create DICOMDIR media
@required {resources: str # A comma separated list of Orthanc resource identifiers to include in the DICOMDIR media.}
@optional {filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), lossy-quality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in v1.12.7), transcode: str # If present, the DICOM files will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html}
@returns(200)

@endpoint POST /tools/create-media-extended
@desc Create DICOMDIR media
@optional {Asynchronous: bool # If `true`, create the archive in asynchronous mode, which means that a job is submitted to create the archive in background., Extended: bool # If `true`, will include additional tags such as `SeriesDescription`, leading to a so-called *extended DICOMDIR*. Default value is `true`., Filename: str # Filename to set in the "Content-Disposition" HTTP header (including file extension), LossyQuality: num # If transcoding to a lossy transfer syntax, this entry defines the quality as an integer between 1 and 100.  If not provided, the value is defined by the "DicomLossyTranscodingQuality" configuration. (new in 1.12.7), Priority: num # In asynchronous mode, the priority of the job. The higher the value, the higher the priority., Resources: [str] # The list of Orthanc identifiers of interest., Synchronous: bool # If `true`, create the archive in synchronous mode, which means that the HTTP answer will directly contain the ZIP file. This is the default, easy behavior. However, if global configuration option "SynchronousZipStream" is set to "false", asynchronous transfers should be preferred for large amount of data, as the creation of the temporary file might lead to network timeouts., Transcode: str # If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html, UserData: map # In asynchronous mode, user data that will be attached to the job., Utf8: bool # If `true`, filenames will be encoded using UTF-8 in the ZIP archive, which may not be supported by your operating system or by your ZIP uncompression software. If `false`, filenames will be encoded using plain ASCII, which was the default in Orthanc <= 1.12.10. Default value is defined by the "ZipUseUtf8" configuration option. (new in 1.12.11)}
@returns(200) {ID: str, Path: str}

@endpoint GET /tools/default-encoding
@desc Get default encoding
@returns(200)

@endpoint PUT /tools/default-encoding
@desc Set default encoding
@returns(200)

@endpoint GET /tools/dicom-conformance
@desc Get DICOM conformance
@returns(200)

@endpoint POST /tools/dicom-echo
@desc Trigger C-ECHO SCU
@optional {AET: str # AET of the remote DICOM modality, CheckFind: bool # Issue a dummy C-FIND command after the C-GET SCU, in order to check whether the remote modality knows about Orthanc. This field defaults to the value of the `DicomEchoChecksFind` configuration option. New in Orthanc 1.8.1., Host: str # Host address of the remote DICOM modality (typically, an IP address), LocalAet: str # Whether to override the default DicomAet in the SCU connection initiated by Orthanc to this modality, Manufacturer: str # Manufacturer of the remote DICOM modality (check configuration option `DicomModalities` for possible values, Port: num # TCP port of the remote DICOM modality, Timeout: num # Whether to override the default DicomScuTimeout in the SCU connection initiated by Orthanc to this modality, UseDicomTls: bool # Whether to use DICOM TLS in the SCU connection initiated by Orthanc (new in Orthanc 1.9.0)}
@returns(200)

@endpoint POST /tools/execute-script
@desc Execute Lua script
@returns(200)

@endpoint POST /tools/find
@desc Look for local resources
@optional {CaseSensitive: bool # Enable case-sensitive search for PN value representations (defaults to configuration option `CaseSensitivePN`), Expand: bool # If set to "true", retrieve detailed information about the individual resources, not only their Orthanc identifiers, Full: bool # If set to `true`, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value), Labels: [str] # List of strings specifying which labels to look for in the resources (new in Orthanc 1.12.0), LabelsConstraint: str # Constraint on the labels, can be `All`, `Any`, or `None` (defaults to `All`, new in Orthanc 1.12.0). From 1.12.11: using `None` together with an empty list of labels looks for the resources that do not have any labels attached., Level: str # Level of the query (`Patient`, `Study`, `Series` or `Instance`), Limit: num # Limit the number of reported resources, MetadataQuery: map # Associative array containing the filter on the values of the metadata (new in Orthanc 1.12.5), OrderBy: [map] # Array of associative arrays containing the requested ordering (new in Orthanc 1.12.5), ParentPatient: str # Limit the reported resources to descendants of this patient (new in Orthanc 1.12.5), ParentSeries: str # Limit the reported resources to descendants of this series (new in Orthanc 1.12.5), ParentStudy: str # Limit the reported resources to descendants of this study (new in Orthanc 1.12.5), Query: map # Associative array containing the filter on the values of the DICOM tags, RequestedTags: [str] # A list of DICOM tags to include in the response (applicable only if "Expand" is set to true).  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 all Main Dicom Tags to keep backward compatibility with Orthanc prior to 1.11.0., ResponseContent: [str] # Defines the content of response for each returned resource. (this field, if present, overrides the "Expand" field).  Allowed values are `MainDicomTags`, `Metadata`, `Children`, `Parent`, `Labels`, `Status`, `IsStable`, `IsProtected`, `Attachments`.  If not specified, Orthanc will return `MainDicomTags`, `Metadata`, `Children`, `Parent`, `Labels`, `Status`, `IsStable`, `IsProtected`.(new in Orthanc 1.12.5), Short: bool # If set to `true`, report the DICOM tags in hexadecimal format, Since: num # Show only the resources since the provided index (in conjunction with `Limit`)}
@returns(200)

@endpoint GET /tools/generate-uid
@desc Generate an identifier
@required {level: str # Type of DICOM resource among: `patient`, `study`, `series` or `instance`}
@returns(200)

@endpoint POST /tools/invalidate-tags
@desc Invalidate DICOM-as-JSON summaries
@returns(200)

@endpoint GET /tools/labels
@desc Get all the used labels
@returns(200)

@endpoint GET /tools/log-level
@desc Get main log level
@returns(200)

@endpoint PUT /tools/log-level
@desc Set main log level
@returns(200)

@endpoint GET /tools/log-level-dicom
@desc Get log level for `dicom`
@returns(200)

@endpoint PUT /tools/log-level-dicom
@desc Set log level for `dicom`
@returns(200)

@endpoint GET /tools/log-level-generic
@desc Get log level for `generic`
@returns(200)

@endpoint PUT /tools/log-level-generic
@desc Set log level for `generic`
@returns(200)

@endpoint GET /tools/log-level-http
@desc Get log level for `http`
@returns(200)

@endpoint PUT /tools/log-level-http
@desc Set log level for `http`
@returns(200)

@endpoint GET /tools/log-level-jobs
@desc Get log level for `jobs`
@returns(200)

@endpoint PUT /tools/log-level-jobs
@desc Set log level for `jobs`
@returns(200)

@endpoint GET /tools/log-level-lua
@desc Get log level for `lua`
@returns(200)

@endpoint PUT /tools/log-level-lua
@desc Set log level for `lua`
@returns(200)

@endpoint GET /tools/log-level-plugins
@desc Get log level for `plugins`
@returns(200)

@endpoint PUT /tools/log-level-plugins
@desc Set log level for `plugins`
@returns(200)

@endpoint GET /tools/log-level-sqlite
@desc Get log level for `sqlite`
@returns(200)

@endpoint PUT /tools/log-level-sqlite
@desc Set log level for `sqlite`
@returns(200)

@endpoint POST /tools/lookup
@desc Look for DICOM identifiers
@returns(200)

@endpoint GET /tools/metrics
@desc Are metrics collected?
@returns(200)

@endpoint PUT /tools/metrics
@desc Enable collection of metrics
@returns(200)

@endpoint GET /tools/metrics-prometheus
@desc Get usage metrics
@returns(200)

@endpoint GET /tools/now
@desc Get UTC time
@returns(200)

@endpoint GET /tools/now-local
@desc Get local time
@returns(200)

@endpoint POST /tools/reconstruct
@desc Reconstruct all the index
@optional {ReconstructFiles: bool # Also reconstruct the files of the resources (e.g: apply IngestTranscoding, StorageCompression). 'false' by default. (New in Orthanc 1.11.0)}
@returns(200)

@endpoint POST /tools/reset
@desc Restart Orthanc
@returns(200)

@endpoint POST /tools/shutdown
@desc Shutdown Orthanc
@returns(200)

@endpoint GET /tools/unknown-sop-class-accepted
@desc Is unknown SOP class accepted?
@returns(200)

@endpoint PUT /tools/unknown-sop-class-accepted
@desc Set unknown SOP class accepted
@returns(200)

@endgroup

@end
