RESTful Web Services

It consists of four sets:

In addition, there is a special transaction defined for user agent to retrieve a machine-readable description of the service(s) implemented by an origin server called Retrieve Capabilities transaction (HTTP OPTION call on a resource).

Studies Web Service

The Studies resource enables a user agent to store, retrieve, update, and search an origin server for DICOM Studies, Series, and Instances, along with their /metadata, /rendered, and /thumbnail variants; as well as frames, bulk data and pixel data.

The Retrieve transaction of this service is also known as WADO-RS. The Store transaction of this service is also known as STOW-RS. The Search transaction of this service is also known as QIDO-RS. All Studies services require support for Retrieve Capabilities Transaction.

Resource Level Services and Transaction

Retrieve Capabilities Transaction

A machine-readable Capabilities Description of the service(s) implemented by an origin server. All RESTful services are required to implement this transaction. Capabilities Description describes the transactions, resources, representations, etc. that are supported by the service(s). Making the HTTP OPTIONS query against an end-point, and a WADL response will be returned explaining the various options and that are supported.

This allows for client application (user agent) to programmatically interrogate the capabilities of origin server for a specific resource level or resource instance level. For example, if the user want to check if a server supports retrieval of DICOM instance metadata as DICOM XML (without the bulk data) for a specific SOP instance, the following must be sent:

OPTIONS http://www.hospital-stmarco/radiology/studies/1.2.250.1.59.40211.12345678.678910 /series/1.2.250.1.59.40211.789001276.14556172.67789 /instances/1.2.250.1.59.40211.2678810.87991027.899772.2/metadata HTTP/1.1 
Host: www.hospital-stmarco 
Accept: multipart/related; type="application/dicom+xml" 
Origin: http://localhost:65232 

Request

The request shall have the following syntax:

OPTIONS SP / SP version CRLF 
Accept: 1#media-type CRLF 
*(header-field CRLF) 
CRLF 

Target Resource

The Target Resource for this transaction is an origin server (e.g. Base URI ("/") for the service). If the capabilities transaction is requested for target resource baseURL/Studies, the origin server should responds with all the capabilities it supports at that resources level and lower level resources, such as series, series/metadata, Instance, instance/metadata, or frame level. For the full list of target resources, refer to 10.1.1 Resource Descriptions.

Query Parameters

No Query Parameters.

Header Fields
Name Values User Agent Origin Server Description
Accept media-type M M The Acceptable Media Types for the response payload.
Accept-Charset charset O O The Acceptable Character Sets of the response payload.

Payload

No payload.

Behavior

Origin server shall return a Capabilities Description, as defined in Annex H, in an Acceptable Media Type. The WADL document shall contain one top-level "application" element and it should contain one "resources" element whose "base" attribute value is the base URL for the service. Additionally, the WADL content shall include a "resource" element for the Target Resource specified in the request describing all methods and child resources for the specified resource and each of its children.

Origin server support of Retrieve Capabilities transaction should support the following use cases for a client application:

Response

The response shall have the following syntax:

version SP status-code SP reason-phrase CRLF 
[Content-Type: media-type CRLF] 
[(Content-Length: uint) / (Transfer-Encoding: encoding) CRLF] 
*(header-field CRLF) 
CRLF 
[payload / status-report] 

Header Fields
Name Value Origin Server Usage Description
Content-Type media-type M The media-type of the payload.
Content-Length uint C Shall be present if a transfer encoding has not been applied to the payload.
Transfer-Encoding encoding C Shall be present if a transfer encoding has been applied to the payload.

Payload

Media Types

Media types supported by the Retrieve Capabilities service are application/vnd.sun.wadl+xml (Web Application Description Language) or application/json.

Status Codes

Example

Check for Capability of Retrieving Metadata as XML:

OPTIONS http://www.hospital-stmarco/radiology/studies/1.2.250.1.59.40211.12345678.678910 /series/1.2.250.1.59.40211.789001276.14556172.67789 /instances/1.2.250.1.59.40211.2678810.87991027.899772.2/metadata HTTP/1.1 
Host: www.hospital-stmarco 
Accept: multipart/related; type="application/dicom+xml" 
Origin: http://localhost:65232 

Retrieve Transaction (WADO-RS)

This Transaction uses the GET method. The media type in the response payload will depend on the Target URI and the Query Parameters. For example, Instances as application/dicom, Metadata as application/dicom+json or application/dicom+xml and rendered Instances as application/jpeg images.

Request

The request shall have the following syntax:

GET SP "/" {/resource} {?parameter*} SP version CRLF 
Accept: 1#media-type CRLF 
*(header-field CRLF) 
CRLF 

Where parameter is one of the Query Parameters defined for the Target Resource below:

Target Resources

Instance Resources

The following Instance Resources are used to retrieve instances.

Instance Resources URI Template
Study Instances /studies/{study}
Series Instances /studies/{study}/series/{series}
Instance /studies/{study}/series/{series}/instances/{instance}

Metadata Resources

Used to retrieve the metadata of instances without retrieving bulk data. Retrieving a Series Metadata resource retrieves all the metadata for all individual instances contained in the Series. Retrieving a Study Metadata resource retrieves all the metadata for all individual instances contained in all the Series.

Rendered Resources

Used to retrieve representations of a DICOM Resource rendered as appropriate images, videos, text documents, or other representations. Its primary use case is to provide user agents with a simple means to display medical images and related documents, without requiring deep knowledge of DICOM data structures and encodings.

Thumbnail Resources

Used to retrieve a rendered representation appropriate to stand for its parent DICOM resource.

Bulkdata Resources

Used to retrieve data elements (typically containing large data, such as pixel data) extracted from DICOM instances.

Note: Bulkdata resources that contain pixel data can be retrieved equivalently using Pixel Data Resource.

Pixel Data Resources

Used to retrieve data elements containing top-level pixel data from DICOM instances.

Note: Frame Pixel Data is inherently pixel data so a /pixeldata sub resource is not needed in the URI Template.

Query Parameters
Key Resources User Agent Origin Server
accept All Resources O M
charset Metadata Resources O M
annotation Rendered Resources O M
quality Rendered Resources O M
viewport Rendered Resources O M
Thumbnail Resources O O
window Rendered Resources O M
iccprofile Rendered Resources O O

Header Fields
Name Values User Agent Origin Server Description
Accept media-type M M The Acceptable Media Types of the response payload.
Accept-Charset charset O M Acceptable Character Sets of the response payload.

Payload

No payload.

Behavior

Origin server shall prepare representation(s) of the Target Resource in the Selected Media Type.

Response

The response shall have the following syntax:

version SP status-code SP reason-phrase CRLF 
[Content-Type: media-type CRLF] 
[(Content-Length: uint / Transfer-Encoding: encoding) CRLF] 
[Content-Location: url CRLF] 
*(header-field CRLF) 
CRLF 
payload / status-report 

Header Fields

The media type of the payload is required if response has a payload.

Payload

Media Types

The origin server shall support the media types specified as default or required in PS3.18 Table 10.4.4-1.

Status Code

Refer to 10.4.3.1 Status Codes.

Store Transaction (STOW-RS)

This transaction uses the POST method to Store representations of Studies, Series, and Instances contained in the request payload.

Note: Implementation should add hooks for reconciliation (Patient Name, Patient ID, and Accession Number) as uploaded studies could be originated in another organization will have different PID.

Request

The request shall have the following syntax:

POST SP "/" {/resource} SP version CRLF 
Accept: 1#media-type CRLF 
Content-Type: dicom-media-type CRLF 
(Content-Length: uint / Transfer-Encoding: encoding) CRLF 
*(header-field CRLF) 
CRLF 
payload 

Target Resource

Query Parameters

No Query Parameters.

Header Fields
Name Value User Agent Origin Server
Content-Type media-type M M
Content-Length uint C M
Transfer-Encoding encoding C M

Payload

The payload shall consist of either:

Behavior

Response

The response shall have the following syntax:

version SP status-code SP reason-phrase CRLF 
[Content-Type: media-type CRLF] 
[(Content-Length: uint CRLF / Transfer-Encoding: encoding CRLF)] 
*(header-field CRLF) 
CRLF 
store-instances-response-module 

Header Fields

The origin server shall support header fields as required in Table 10.5.3-2.

Payload

Media Types

The origin server shall support the default and required media types as specified in Table 10.5.4-1.

Status Code

Search Transaction (QIDO-RS)

This transaction uses the GET method to search for Studies, Series, and Instances managed by the origin server.

Request

The request shall have the following syntax:

GET SP "/" {/resource} {?search*} SP version CRLF 
Accept: 1#search-media-type CRLF 
*(header-field CRLF) 
CRLF 
Where search-media-type =multipart/related; type="application/dicom+xml"/ dicom-json 

Target Resources

The Target Resource Path component of the Target URI specifies the collection of resources that is the target of the search.

Query Parameters

keyword= ; A keyword from Table 6-1 "Registry of DICOM Data Elements" in PS3.6.

Header Fields

Payload

No payload.

Response

The response shall have the following syntax:

version SP status-code SP reason-phrase CRLF 
[Content-Type: media-type CRLF] 
[Content-Location: url CRLF] 
[(Content-Length: uint / Transfer-Encoding: encoding) CRLF] 
*(header-field CRLF) 
CRLF 
[payload / status-report] 

Status Codes

Header Fields

Refer to Table 10.6.3-2. Response Header Fields.

Payload

Media Types

The origin server shall support the default and required media types as specified in Table 10.6.4-1.

Notes on Implementation

Additional DICOMweb services

Not covered in this document are as follows:

Worklist Web Service (UPS-RS)

Defines a RESTful interface to the unified procedure step service SOP classes defined in Section B.26 "Unified Procedure Step IOD" in PS3.3 and Section CC "Unified Procedure Step Service and SOP Classes (Normative)" in PS3.4, in which UPS behavior is specified.

The following resources are defined:

The URI Templates defined by this service are specified in Table 11.1.1-1.

The Worklist service consists of transactions in Table 11.3-1.

Non-Patient Instance Service (NPI)

Enables a user agent to retrieve, store, and search an origin server for instances that are not related to an individual patient.

The following NPI resources are defined in the standard:

The following transactions are defined for the above resources:

Storage Commitment Service

This enables a user agent to request the safekeeping of instances on an origin server. It corresponds to the DIMSE Storage Commitment Service Class as defined in Section J "Storage Commitment Service Class (Normative)" in PS3.4 and has the same semantics.

As committing to storage of instances is often a long-running operation on the origin server, the use of this service may be split into two transactions, at the discretion of the origin server: 1. requesting the commitment, and - when the origin server cannot give the result yet - 2. checking for the result, in line with the Asynchronous Request-Reply (ARR) pattern [Ekuan].

The Storage Commitment request shall have the following syntax:

POST SP /commitment-requests/{transactionUID} SP version CRLF 
Accept: 1#media-type CRLF 
*(header-field CRLF) 
CRLF 

Target Resource

/commitment-requests.

Payload

The Result Check Transaction shall have following syntax:

GET SP /commitment-requests/{transactionUID} SP version CRLF 
Accept: 1#media-type CRLF 
*(header-field CRLF) 
CRLF 

See Also

WADO-URI Web Service

Help Version 23.0.2024.12.11
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Imaging, Medical, and Document
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.