DICOMweb servicesURLs, media types and status codes

One page with the DICOMweb transactions of PS3.18: which URL and method does what, which media types come back, which query parameters search and render, what the status codes mean, and how each maps to the older DIMSE service.

The DICOMweb services

PS3.18 defines one URI service and several REST services. Each service is a set of transactions on a set of resources.

ServiceWhat it managesAlso known as
Studies ServiceStudies, series, instances, and their metadata, rendered, thumbnail, frame and bulk data variants.WADO-RS (retrieve), STOW-RS (store), QIDO-RS (search)
Worklist ServiceA worklist of workitems (UPS instances): create, retrieve, update, change state, cancel, search and subscribe.UPS-RS
URI ServiceRetrieval of single composite instances by a query string.WADO-URI
Non-Patient Instance ServiceNon-patient instances such as color palettes.
Storage Commitment ServiceA request that the server takes safekeeping of instances.
Modality Scheduled Procedure Step ServiceSearching for scheduled procedure steps.
Modality Performed Procedure Step ServiceReporting progress on performed procedure steps.

Every REST service must implement the Retrieve Capabilities transaction: an `OPTIONS` request on the base URI that returns a machine readable description of what the server supports, as WADL (`application/vnd.sun.wadl+xml`) or `application/json`.

The Studies Service transactions

Three transactions, each with one HTTP method.

TransactionMethodRequest payloadSuccess responseDIMSE counterpart
Search (QIDO-RS)GETNoneA list of matchesC-FIND
Retrieve (WADO-RS)GETNoneInstances, metadata, renderings, pixel data or bulk dataC-MOVE or C-GET
Store (STOW-RS)POSTInstancesA Store Instances ResponseC-STORE
Retrieve CapabilitiesOPTIONSNoneA Capabilities DescriptionNo equivalent

An origin server may be a native implementation or a DIMSE proxy that converts web requests into DIMSE requests and back. A proxy has fewer mandatory search resources.

Search URLs (QIDO-RS)

Six search resources. Native servers support all; DIMSE proxies must support the hierarchical ones.

ResourceURL templateNativeProxyQuery type
All Studies/studies{?search*}MandatoryMandatoryHierarchical
Study's Series/studies/{study}/series{?search*}MandatoryMandatoryHierarchical
Study's Series' Instances/studies/{study}/series/{series}/instances{?search*}MandatoryMandatoryHierarchical
Study's Instances/studies/{study}/instances{?search*}MandatoryOptionalRelational
All Series/series{?search*}MandatoryOptionalRelational
All Instances/instances{?search*}MandatoryOptionalRelational

Examples from the standard: `/studies?PatientID=11235813&StudyDate=20130509-20130510` and `/studies?00100010=SMITH*&limit=25`. A key can be a keyword or an 8-digit tag.

Search query parameters

All search transactions support these parameters on the origin server. The user agent may use them.

ParameterMeaningDIMSE counterpartDetail
Attribute = valueA matching keyMatching keySame matching types as C-FIND: single value, wild card, range, UID list. Each attribute once. Characters such as #, [, ], &, = and , must be percent-encoded.
includefieldMore attributes to return, or allReturn keyA comma-separated list, or all. If all is present no other includefield is allowed.
limitMaximum number of matches in one response-An unsigned integer. The server may apply its own system limit.
offsetNumber of matches to skip-An unsigned integer, default 0. The same request returns the same ordered list if the data has not changed.
fuzzymatchingFuzzy matching of person namesExtended negotiationtrue or false, default false. If not supported the server searches literally and adds a Warning: 299 header.
emptyvaluematchingMatch attributes that have an empty value-Optional, default false. If not supported the server adds a Warning header.
multiplevaluematchingMatch attributes with several values-Optional, default false. If not supported the server adds a Warning header.

If more results exist the response carries `Warning: 299 <service>: There are <remaining> additional results that can be requested`. A search with no matches is a 200 with an empty payload (an empty JSON array for application/dicom+json). An unsupported parameter is ignored; a supported parameter with an invalid value gives 400.

Required matching attributes and what a search returns

The levels follow the Study Root model: the patient attributes belong to the study. These are the required matching attributes per level.

LevelRequired matching attributesAlways returned
StudyStudy Date (0008,0020), Study Time, Accession Number (0008,0050), Modalities In Study (0008,0061), Referring Physician Name, Patient Name, Patient ID, Study Instance UID (0020,000D), Study IDThe matching attributes plus Patient's Birth Date and Sex, Number of Study Related Series (0020,1206) and Instances (0020,1208), and Retrieve URL (0008,1190) when retrievable
SeriesModality (0008,0060), Series Instance UID (0020,000E), Series Number, Performed Procedure Step Start Date and Time, Request Attributes SequencePlus Number of Series Related Instances (0020,1209), and Series Description if known
InstanceSOP Class UID (0008,0016), SOP Instance UID (0008,0018), Instance NumberPlus Rows, Columns, Bits Allocated and Number of Frames if known, and Retrieve URL

The list is consistent with the keys of IHE RAD-14. Optionally the server can support the Repository Query attributes Prior Record Key (0008,041C) and Maximum Number of Records (0008,0429). The response may include Available Transfer Syntax UID (0008,3002).

Retrieve URLs (WADO-RS)

The resources of the Retrieve Transaction. All are `GET`.

What you getURL templateSupport
Instances of a study, series or one instance/studies/{study}, .../series/{series}, .../instances/{instance}Mandatory
Metadata (without bulk data)/studies/{study}/metadata, .../series/{series}/metadata, .../instances/{instance}/metadataMandatory
Rendered images or documents.../rendered on a study, series or instance, and .../frames/{frames}/renderedMandatory
Thumbnail.../thumbnail on a study, series, instance or framesOptional, all or none
Bulk data{bulkdataURI}, and .../bulkdata on a study, series or instanceBulk Data URI mandatory, the /bulkdata resources optional
Pixel data.../pixeldata on a study, series or instanceOptional
Frames/studies/{study}/series/{series}/instances/{instance}/frames/{frames}Mandatory
Rendered MPR volume.../renderedmprOptional
Rendered 3D volume.../rendered3dOptional

`{frames}` is a comma-separated list of frame numbers in ascending order. The retrieve transaction has no request payload. A Bulk Data URI can be absolute, relative with an absolute path, or relative to the metadata request.

Media types

The Accept header chooses the representation. These are the defaults and requirements from PS3.18.

ResourceMedia typeUsage
Instances (retrieve)multipart/related; type="application/dicom"Default
Instances (retrieve)multipart/related; type="application/octet-stream"Required (the same as retrieving the bulk data)
A single instanceapplication/dicomOptional. Single part: only for a resource that is one item.
Metadataapplication/dicom+jsonDefault. JSON for several instances is one top-level array.
Metadatamultipart/related; type="application/dicom+xml"Required
Bulk data and pixel datamultipart/related; type="application/octet-stream"Required
Thumbnailimage/jpegDefault
Rendered single frame imageimage/jpeg (default), image/gif and image/png (required for REST)Also optional: image/jp2, image/jph, image/jxl
Rendered texttext/html (default), text/plain (required), text/xml (required for REST)Also optional: text/rtf, application/pdf
Rendered videovideo/mpeg, video/mp4, video/H265Optional
Search resultsapplication/dicom+json (default), multipart/related; type="application/dicom+xml" (required)
Capabilitiesapplication/vnd.sun.wadl+xml or application/json

Two parameters refine a DICOM media type: `transfer-syntax=<UID or *>` and `charset=`. A media type may have only one transfer-syntax value, so several choices are given as several media types with q values. Implicit VR Little Endian and the retired Explicit VR Big Endian must not be used. The default for an uncompressed instance is Explicit VR Little Endian (`1.2.840.10008.1.2.1`).

Parameters for rendered images

These work on the /rendered resources. They are applied as if they were a presentation state, and all are optional for the user agent.

ParameterValueMeaningErrors
acceptA rendered media typeThe format of the image406 if not supported
annotationpatient and/or techniqueBurns patient or technique information into the picture. Absent means no annotation.400 for non-keywords; unsupported values are ignored with a Warning
quality1 to 100Requested quality for formats that allow lossy compression400 if not an integer from 1 to 100
viewportvw,vh or vw,vh,sx,sy,sw,shCrop a source region and scale it to fit the viewport without distortion. Without it the image keeps its own size.400 if ill-formed
windowcenter,width,functionWindow center and width, function linear, linear-exact or sigmoid. All three are required.400 if missing or ill-formed, and not allowed on a presentation state
iccprofileno, yes, srgb, adobergb, rommrgb or displayp3Whether and which ICC profile is in the rendered image

The grayscale or color space of a rendered image is not defined by the standard, even if the pipeline works in P-Values. For a presentation state as target the viewport can only be `vw,vh`.

Status codes

DICOMweb uses ordinary HTTP status codes. These are the ones the transactions use most.

CodeMeaning in DICOMwebWhere
200 OKAll representations are in the payload. For a search with no matches: an empty list. A store where every instance was stored.Search, Retrieve, Store
201 CreatedOne or more new resources were created.Create
202 AcceptedThe request was accepted but not completed, or for a store only some instances were stored and others have warnings or failures.Store
204 No ContentSuccess without a payload, for example a conditional retrieve that is not modified.Various
304 Not ModifiedA conditional request found the cached copy up to date.Capabilities
400 Bad RequestBad syntax, an invalid query parameter value, or an invalid header.All
401 UnauthorizedNo valid credentials. The server sends a WWW-Authenticate header.All
403 ForbiddenUnderstood but refused, for example insufficient privileges. A server may use 404 instead.All
404 Not FoundThe target resource does not exist, or the server does not disclose that it does.Retrieve
405 Method Not AllowedThe method is not supported by the resource. The response has an Allow header.All
406 Not AcceptableNo representation matches the Accept header or query parameter.Retrieve
409 ConflictNothing could be stored because of a conflict: unsupported SOP Class, Study Instance UID mismatch.Store
410 GoneThe resource was deleted.Retrieve
413 Payload Too LargeA retrieved resource is too large to return, or a search was too broad.Retrieve, Search
415 Unsupported Media TypeThe Content-Type of the request is not supported.Store
501 Not ImplementedUsed for SOP Class not supported errors.Various
503 Service UnavailableTemporary overload or maintenance.All

A failure response should have a Status Report in the payload. The standard notes that policy may require a 404 in place of a 401 or 403 so that a client cannot infer that a resource exists.

DICOMweb next to DIMSE

The services map on each other, but not one to one.

DIMSEDICOMwebDifference
C-FIND (Study Root)Search GET /studies, /series, /instancesMatching keys are query parameters, return keys are includefield. Paging has limit and offset. A search with no match returns 200.
C-MOVE / C-GETRetrieve GET /studies/{study}...No sub-association and no move destination: the data comes back in the HTTP response.
C-STOREStore POST /studiesMany instances in one request, with a multipart body. The status is 200, 202 or 409.
Association negotiation (SOP Classes, transfer syntaxes)Accept header, transfer-syntax parameter, Retrieve CapabilitiesThe client names the formats it accepts per request.
UPS N-CREATE, N-GET, N-SET, N-ACTION, N-EVENT-REPORTUPS-RS: Create, Retrieve, Update, Change State, Request Cancellation, Subscribe; notifications over a WebSocket connectionA workitem is a UPS instance and the worklist is a single collection per service.
Status codes such as FF00, 0000, A700HTTP status codes plus a Warning headerA DICOM status code can be carried in the Warning header text.

WADO-URI: the older single-instance service

The URI Service retrieves one composite instance with one GET. The resource is identified by query parameters, not by a path.

ParameterValueMeaning
requestTypeWADORequired. Anything else the server does not support gives 400.
studyUIDA UIDRequired, the Study Instance UID.
seriesUIDA UIDRequired, the Series Instance UID.
objectUIDA UIDRequired, the SOP Instance UID.
contentTypeapplication/dicom or a rendered media typeOptional. Transfer-syntax and charset media type parameters are forbidden and give 400.
charsetA character setOptional.

Without a `contentType` and with an Accept header of `*/*` the response defaults to `image/jpeg`, a rendered instance. The URI Service retrieves only single instances and is more limited than the Retrieve Transaction of the Studies Service.

UPS-RS: the Worklist Service

The Worklist Service manages one worklist per service, holding workitems.

TransactionMethodURLDIMSE counterpart
CreatePOST/workitems?{workitem}N-CREATE
RetrieveGET/workitems/{workitem}N-GET
UpdatePOST/workitems/{workitem}?{TransactionUid}N-SET
Change StatePUT/workitems/{workitem}/state?requester={aetitle}N-ACTION
Request CancellationPOST/workitems/{workitem}/cancelrequest?requester={aetitle}N-ACTION
SearchGET/workitems with match, includefield, fuzzymatching, offset and limitC-FIND
SubscribePOST/workitems/{resource}/subscribers/{subscriber}, with optional deletionlock and filterN-ACTION
UnsubscribeDELETEThe subscription resourceN-ACTION

The workitem UID goes in a query parameter of the Create request, where DIMSE uses the Affected SOP Instance UID. Notifications correspond to N-EVENT-REPORT. The client opens a WebSocket notification connection with `GET /subscribers/{requester}`, and the server sends the event reports over it.

Glossary

Origin server
The server that holds the resources and answers requests. A DICOMweb PACS endpoint.
User agent
The client that sends the request: a viewer, a scanner, an importer.
Resource
Something with a URL, such as a study, a series, an instance or a frame.
Representation
One encoding of a resource, chosen with a media type.
Multipart payload
A body with several parts, each with its own Content-Type and Content-Location, used for instances, frames and bulk data.
Bulk data
Large values in a data set, such as pixel data, that can be retrieved separately by a URI.
Native / proxy
A server that stores DICOM itself, or one that converts web requests into DIMSE requests for another system.
Workitem
One procedure step in the UPS worklist, called a UPS instance in DIMSE.

Summary

  • Search, Retrieve and Store are GET /studies..., GET /studies/{study}/... and POST /studies: QIDO-RS, WADO-RS and STOW-RS.
  • Search keys are query parameters, with includefield, limit, offset and fuzzymatching as extras.
  • application/dicom+json is the default for search and metadata. Instances and bulk data come in multipart/related.
  • A rendered image is GET .../rendered and defaults to image/jpeg for a single frame image.
  • A search with no matches returns 200 with an empty list. 202 on a store means only part of it was stored.
  • Implicit VR Little Endian is not allowed in web services. The default uncompressed transfer syntax is Explicit VR Little Endian.

Common questions

What are the DICOMweb URLs for a study?

Search: /studies and /studies/{study}/series. Retrieve: /studies/{study} for the instances, /studies/{study}/metadata for the metadata, /studies/{study}/rendered for rendered images, with the same pattern for series and instances. Store: POST /studies or POST /studies/{study}.

Is it QIDO, WADO or STOW?

QIDO-RS searches (GET), WADO-RS retrieves (GET) and STOW-RS stores (POST). They are the Search, Retrieve and Store transactions of the Studies Service. WADO-URI is a separate, older service that retrieves one instance through a query string.

How do I page through a large search result?

Use limit and offset. The server returns a Warning header saying how many more results can be requested. The same request gives the same order as long as the data has not changed, but if studies are added or removed between requests the pages can be inconsistent.

Why does my search for an Accession Number or name return nothing?

The matching rules are those of C-FIND. A name is matched literally unless the server supports fuzzy matching, so a wild card such as SMITH* is usually needed. If you ask for fuzzy matching and the server does not support it, it searches literally and tells you with a Warning header.

Which transfer syntax do I get?

The one in the transfer-syntax parameter of the media type, if the server supports it and can supply it. Without one, the default is Explicit VR Little Endian for uncompressed data, unless the server only has the pixels in a compressed form that cannot be sent that way.

Can a web client delete studies?

The Studies Service transactions in PS3.18 2026d are Search, Retrieve and Store. Deleting is not one of them, though the status code 410 shows that a deleted resource is reported as gone.

Try it yourself

← All lessons