Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
description: 'This is the full documentation of the REST API of Orthanc.
This reference is automatically generated from the source code of Orthanc. A shorter cheat sheet is part of the Orthanc Book.
An earlier, manually crafted version from August 2019, is still available, but is not up-to-date anymore (source).'
title: Orthanc Studies API
version: 1.13.0
servers:
- url: https://orthanc.uclouvain.be/demo/
tags:
- name: Studies
paths:
/studies:
get:
deprecated: false
description: List the Orthanc identifiers of all the available DICOM studies
parameters:
- description: If present, retrieve detailed information about the individual resources, not only their Orthanc identifiers
in: query
name: expand
required: false
schema:
type: string
- description: If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value)
in: query
name: full
required: false
schema:
type: boolean
- description: Limit the number of results
in: query
name: limit
required: false
schema:
type: number
- description: 'If present, list the DICOM Tags you want to list in the response. This argument is a semi-column separated list of DICOM Tags identifiers; e.g: ''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.'
in: query
name: requested-tags
required: false
schema:
type: string
- description: '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`)'
in: query
name: response-content
required: false
schema:
type: string
- description: If present, report the DICOM tags in hexadecimal format
in: query
name: short
required: false
schema:
type: boolean
- description: Show only the resources since the provided index
in: query
name: since
required: false
schema:
type: number
responses:
'200':
content:
application/json:
schema:
description: JSON array containing either the Orthanc identifiers, or detailed information about the reported studies (if `expand` argument is provided)
example:
- 0dff9280-2375f586-1297870c-4cbd6d1c-527e36e5
- 1c379a23-9fd28bba-02b60e5b-850ff34e-4349f09b
description: ''
summary: List the available studies
tags:
- Studies
operationId: getStudies
x-operation-id-source: derived
/studies/{id}:
delete:
deprecated: false
description: Delete the DICOM study whose Orthanc identifier is provided in the URL
parameters:
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
responses:
'200':
description: ''
summary: Delete some study
tags:
- Studies
operationId: deleteStudiesById
x-operation-id-source: derived
get:
deprecated: false
description: Get detailed information about the DICOM study whose Orthanc identifier is provided in the URL
parameters:
- description: If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value)
in: query
name: full
required: false
schema:
type: boolean
- description: 'If present, list the DICOM Tags you want to list in the response. This argument is a semi-column separated list of DICOM Tags identifiers; e.g: ''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.'
in: query
name: requested-tags
required: false
schema:
type: string
- description: If present, report the DICOM tags in hexadecimal format
in: query
name: short
required: false
schema:
type: boolean
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
description: Information about the DICOM study
example:
ID: 27f7126f-4f66fb14-03f4081b-f9341db2-53925988
IsStable: true
Labels: []
LastUpdate: 20231109T160811
MainDicomTags:
AccessionNumber: '0'
InstitutionName: 7GEFF0GbzqCNo43Yd0,Ibu,zQSSX
ReferringPhysicianName: dAEvNTxZJO0E
RequestedProcedureDescription: IRM cérébrale, neuro-crâne
StudyDate: '20061201'
StudyDescription: IRM cérébrale, neuro-crâne
StudyID: '218211405'
StudyInstanceUID: 2.16.840.1.113669.632.20.1211.10000357775
StudyTime: '141645.000000'
ParentPatient: 16738bc3-e47ed42a-43ce044c-a3414a45-cb069bd0
PatientMainDicomTags:
PatientBirthDate: '19490301'
PatientID: 5Yp0E
PatientName: BRAINIX
PatientSex: '0000'
Series:
- 1e2c125c-411b8e86-3f4fe68e-a7584dd3-c6da78f0
- 2ac1316d-3e432022-62eabff2-c59f5475-9b1ac3f8
- 3ca69615-fcd4a4fb-e5f2cc9d-9c7a49a5-add98bbf
- 4baa97c7-d53d3d82-a5eb9403-17ef5a77-4e0efb55
- 635faa23-fd8378ee-d03bce29-ee47c2fb-a65c5509
- ae164c84-e5bd0366-ba937a6d-65414092-f294d6b6
- dc0216d2-a406a5ad-31ef7a78-113ae9d9-29939f9e
Type: Study
description: ''
summary: Get information about some study
tags:
- Studies
operationId: getStudiesById
x-operation-id-source: derived
/studies/{id}/anonymize:
post:
deprecated: false
description: Start a job that will anonymize all the DICOM instances within the study whose identifier is provided in the URL. The modified DICOM instances will be stored into a brand new study, whose Orthanc identifiers will be returned by the job. https://orthanc.uclouvain.be/book/users/anonymization.html#anonymization-of-patients-studies-or-series
parameters:
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
description: ''
properties:
Asynchronous:
description: 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.
type: boolean
DicomVersion:
description: Version of the DICOM standard to be used for anonymization. Check out configuration option `DeidentifyLogsDicomVersion` for possible values.
type: string
Force:
description: Allow the modification of tags related to DICOM identifiers, at the risk of breaking the DICOM model of the real world
type: boolean
Keep:
description: List of DICOM tags whose value must not be destroyed by the anonymization. Starting with Orthanc 1.9.4, paths to subsequences can be provided using the same syntax as the `dcmodify` command-line tool (wildcards are supported as well).
items:
type: string
type: array
KeepLabels:
description: Keep the labels of all resources level (defaults to `false`)
type: boolean
KeepPrivateTags:
description: Keep the private tags from the DICOM instances (defaults to `false`)
type: boolean
KeepSource:
description: If set to `false`, instructs Orthanc to the remove original resources. By default, the original resources are kept in Orthanc.
type: boolean
LossyQuality:
description: 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)
type: number
Permissive:
description: If `true`, ignore errors during the individual steps of the job. Default value is `false`.
type: boolean
Priority:
description: In asynchronous mode, the priority of the job. The higher the value, the higher the priority. Default value is `0`
type: number
PrivateCreator:
description: The private creator to be used for private tags in `Replace`
type: string
Remove:
description: List of additional tags to be removed from the DICOM instances. Starting with Orthanc 1.9.4, paths to subsequences can be provided using the same syntax as the `dcmodify` command-line tool (wildcards are supported as well).
items:
type: string
type: array
Replace:
description: Associative array to change the value of some DICOM tags in the DICOM instances. Starting with Orthanc 1.9.4, paths to subsequences can be provided using the same syntax as the `dcmodify` command-line tool (wildcards are supported as well).
type: object
Synchronous:
description: 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.
type: boolean
Transcode:
description: 'Transcode the DICOM instances to the provided DICOM transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html'
type: string
UserData:
description: User data that will travel along with the job.
type: object
responses:
'200':
content:
application/json:
examples: {}
schema:
description: ''
properties:
ID:
description: In asynchronous mode, identifier of the job
type: string
Path:
description: In asynchronous mode, path to access the job in the REST API
type: string
description: ''
summary: Anonymize study
tags:
- Studies
operationId: postStudiesByIdAnonymize
x-operation-id-source: derived
/studies/{id}/archive:
get:
deprecated: false
description: Synchronously create a ZIP archive containing the DICOM study whose Orthanc identifier is provided in the URL. This flavor is synchronous, which might *not* be desirable to archive large amount of data, as it might lead to network timeouts. Prefer the asynchronous version using `POST` method.
parameters:
- description: Filename to set in the "Content-Disposition" HTTP header (including file extension)
in: query
name: filename
required: false
schema:
type: string
- description: 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)
in: query
name: lossy-quality
required: false
schema:
type: number
- description: 'If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html'
in: query
name: transcode
required: false
schema:
type: string
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/zip:
examples: {}
schema:
description: ZIP file containing the archive
description: ''
summary: Create ZIP archive
tags:
- Studies
operationId: getStudiesByIdArchive
x-operation-id-source: derived
post:
deprecated: false
description: Create a ZIP archive containing the DICOM study whose Orthanc identifier is provided in the URL
parameters:
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
description: ''
properties:
Asynchronous:
description: If `true`, create the archive in asynchronous mode, which means that a job is submitted to create the archive in background.
type: boolean
Filename:
description: Filename to set in the "Content-Disposition" HTTP header (including file extension)
type: string
LossyQuality:
description: 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)
type: number
Priority:
description: In asynchronous mode, the priority of the job. The higher the value, the higher the priority.
type: number
Synchronous:
description: 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.
type: boolean
Transcode:
description: 'If present, the DICOM files in the archive will be transcoded to the provided transfer syntax: https://orthanc.uclouvain.be/book/faq/transcoding.html'
type: string
UserData:
description: In asynchronous mode, user data that will be attached to the job.
type: object
Utf8:
description: 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)
type: boolean
responses:
'200':
content:
application/json:
examples: {}
schema:
description: 'In asynchronous mode, information about the job that has been submitted to generate the archive: https://orthanc.uclouvain.be/book/users/advanced-rest.html#jobs'
properties:
ID:
description: Identifier of the job
type: string
Path:
description: Path to access the job in the REST API
type: string
application/zip:
examples: {}
schema:
description: In synchronous mode, the ZIP file containing the archive
description: ''
summary: Create ZIP archive
tags:
- Studies
operationId: postStudiesByIdArchive
x-operation-id-source: derived
/studies/{id}/attachments:
get:
deprecated: false
description: Get the list of attachments that are associated with the given study
parameters:
- description: If present, retrieve the attachments list and their numerical ids
in: query
name: full
required: false
schema:
type: string
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
description: JSON array containing the names of the attachments
example: []
description: ''
summary: List attachments
tags:
- Studies
operationId: getStudiesByIdAttachments
x-operation-id-source: derived
/studies/{id}/attachments/{name}:
delete:
deprecated: false
description: Delete an attachment associated with the given DICOM study. This call will fail if trying to delete a system attachment (i.e. whose index is < 1024).
parameters:
- description: Revision of the attachment, to check if its content has not changed and can be deleted. This header is mandatory if `CheckRevisions` option is `true`.
in: header
name: If-Match
required: false
schema:
type: string
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
- description: The name of the attachment, or its index (cf. `UserContentType` configuration option)
in: path
name: name
required: true
schema:
type: string
responses:
'200':
description: ''
summary: Delete attachment
tags:
- Studies
operationId: deleteStudiesByIdAttachmentsByName
x-operation-id-source: derived
put:
deprecated: false
description: Attach a file to the given DICOM study. This call will fail if trying to modify a system attachment (i.e. whose index is < 1024).
parameters:
- description: Revision of the attachment, if this is not the first time this attachment is set.
in: header
name: If-Match
required: false
schema:
type: string
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
- description: The name of the attachment, or its index (cf. `UserContentType` configuration option)
in: path
name: name
required: true
schema:
type: string
requestBody:
content:
application/octet-stream:
schema:
description: Binary data containing the attachment
responses:
'200':
content:
application/json:
examples: {}
schema:
description: Empty JSON object in the case of a success
description: ''
summary: Set attachment
tags:
- Studies
operationId: putStudiesByIdAttachmentsByName
x-operation-id-source: derived
/studies/{id}/attachments/{name}/compress:
post:
deprecated: false
description: Change the compression scheme that is used to store an attachment.
parameters:
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
- description: The name of the attachment, or its index (cf. `UserContentType` configuration option)
in: path
name: name
required: true
schema:
type: string
responses:
'200':
description: ''
summary: Compress attachment
tags:
- Studies
operationId: postStudiesByIdAttachmentsByNameCompress
x-operation-id-source: derived
/studies/{id}/attachments/{name}/compressed-data:
get:
deprecated: false
description: Get the (binary) content of one attachment associated with the given study. The attachment will not be decompressed if `StorageCompression` is `true`.
parameters:
- description: Filename to set in the "Content-Disposition" HTTP header (including file extension)
in: query
name: filename
required: false
schema:
type: string
- description: Optional revision of the attachment, to check if its content has changed
in: header
name: If-None-Match
required: false
schema:
type: string
- description: Optional content range to access part of the attachment (new in Orthanc 1.12.5)
in: header
name: Range
required: false
schema:
type: string
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
- description: The name of the attachment, or its index (cf. `UserContentType` configuration option)
in: path
name: name
required: true
schema:
type: string
responses:
'200':
content:
application/octet-stream:
examples: {}
schema:
description: The attachment
description: ''
headers:
ETag:
description: Revision of the attachment, to be used in further `PUT` or `DELETE` operations
summary: Get attachment (no decompression)
tags:
- Studies
operationId: getStudiesByIdAttachmentsByNameCompressedData
x-operation-id-source: derived
/studies/{id}/attachments/{name}/compressed-md5:
get:
deprecated: false
description: Get the MD5 hash of one attachment associated with the given study, as stored on the disk. This is different from `.../md5` iff `EnableStorage` is `true`.
parameters:
- description: Optional revision of the attachment, to check if its content has changed
in: header
name: If-None-Match
required: false
schema:
type: string
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
- description: The name of the attachment, or its index (cf. `UserContentType` configuration option)
in: path
name: name
required: true
schema:
type: string
responses:
'200':
content:
text/plain:
examples: {}
schema:
description: The MD5 of the attachment, as stored on the disk
description: ''
headers:
ETag:
description: Revision of the attachment, to be used in further `PUT` or `DELETE` operations
summary: Get MD5 of attachment on disk
tags:
- Studies
operationId: getStudiesByIdAttachmentsByNameCompressedMd5
x-operation-id-source: derived
/studies/{id}/attachments/{name}/compressed-size:
get:
deprecated: false
description: Get the size of one attachment associated with the given study, as stored on the disk. This is different from `.../size` iff `EnableStorage` is `true`.
parameters:
- description: Optional revision of the attachment, to check if its content has changed
in: header
name: If-None-Match
required: false
schema:
type: string
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
- description: The name of the attachment, or its index (cf. `UserContentType` configuration option)
in: path
name: name
required: true
schema:
type: string
responses:
'200':
content:
text/plain:
examples: {}
schema:
description: The size of the attachment, as stored on the disk
description: ''
headers:
ETag:
description: Revision of the attachment, to be used in further `PUT` or `DELETE` operations
summary: Get size of attachment on disk
tags:
- Studies
operationId: getStudiesByIdAttachmentsByNameCompressedSize
x-operation-id-source: derived
/studies/{id}/attachments/{name}/data:
get:
deprecated: false
description: Get the (binary) content of one attachment associated with the given study
parameters:
- description: Filename to set in the "Content-Disposition" HTTP header (including file extension)
in: query
name: filename
required: false
schema:
type: string
- description: Optional revision of the attachment, to check if its content has changed
in: header
name: If-None-Match
required: false
schema:
type: string
- description: Optional content range to access part of the attachment (new in Orthanc 1.12.5)
in: header
name: Range
required: false
schema:
type: string
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
- description: The name of the attachment, or its index (cf. `UserContentType` configuration option)
in: path
name: name
required: true
schema:
type: string
responses:
'200':
content:
application/octet-stream:
examples: {}
schema:
description: The attachment
description: ''
headers:
ETag:
description: Revision of the attachment, to be used in further `PUT` or `DELETE` operations
summary: Get attachment
tags:
- Studies
operationId: getStudiesByIdAttachmentsByNameData
x-operation-id-source: derived
/studies/{id}/attachments/{name}/info:
get:
deprecated: false
description: Get all the information about the attachment associated with the given study
parameters:
- description: Optional revision of the attachment, to check if its content has changed
in: header
name: If-None-Match
required: false
schema:
type: string
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
- description: The name of the attachment, or its index (cf. `UserContentType` configuration option)
in: path
name: name
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
description: JSON object containing the information about the attachment
example:
CompressedMD5: 26f3fad6ca0c355f02d57c7fa6770248
CompressedSize: 526970
ContentType: 1
UncompressedMD5: 26f3fad6ca0c355f02d57c7fa6770248
UncompressedSize: 526970
Uuid: ada05909-0efc-43fd-b615-c5cafbaeacf8
description: ''
headers:
ETag:
description: Revision of the attachment, to be used in further `PUT` or `DELETE` operations
summary: Get info about the attachment
tags:
- Studies
operationId: getStudiesByIdAttachmentsByNameInfo
x-operation-id-source: derived
/studies/{id}/attachments/{name}/is-compressed:
get:
deprecated: false
description: Test whether the attachment has been stored as a compressed file on the disk.
parameters:
- description: Optional revision of the attachment, to check if its content has changed
in: header
name: If-None-Match
required: false
schema:
type: string
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
- description: The name of the attachment, or its index (cf. `UserContentType` configuration option)
in: path
name: name
required: true
schema:
type: string
responses:
'200':
content:
text/plain:
examples: {}
schema:
description: '`0` if the attachment was stored uncompressed, `1` if it was compressed'
description: ''
headers:
ETag:
description: Revision of the attachment, to be used in further `PUT` or `DELETE` operations
summary: Is attachment compressed?
tags:
- Studies
operationId: getStudiesByIdAttachmentsByNameIsCompressed
x-operation-id-source: derived
/studies/{id}/attachments/{name}/md5:
get:
deprecated: false
description: Get the MD5 hash of one attachment associated with the given study
parameters:
- description: Optional revision of the attachment, to check if its content has changed
in: header
name: If-None-Match
required: false
schema:
type: string
- description: Orthanc identifier of the study of interest
in: path
name: id
required: true
schema:
type: string
- description: The name of the attachment, or its index (cf. `UserContentType` configuration option)
in: path
name: name
required: true
schema:
type: string
responses:
'200':
content:
text/plain:
examples: {}
schema:
description: The MD5 of the attachment
description: ''
headers:
ETag:
description: Revision of the attachment, to be used in further `PUT` or `DELETE` operations
summary: Get MD5 of attachment
tags:
- Studies
operationId: getStudiesByIdAttachmentsByNameMd5
x-operation-id-source: derived
/studies/{id}/attachments/{name}/size:
get:
deprecated: false
description: Get the size of one attachment associated with the given study
parameters:
- description: Optional revision of the attachment, to check if its content has changed
in: header
name: If-None-Match
required: false
schema:
# --- truncated at 32 KB (87 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/uclouvain/refs/heads/main/openapi/uclouvain-studies-api-openapi.yml