This page is part of the FHIR Specification (v5.0.0-draft-final: Final QA Preview for R5 - see ballot notes). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4
FHIR Infrastructure Work Group | Maturity Level: 5 | Trial Use | Compartments: N/A |
Using the FHIR Version Mime Type Parameter, a server can support multiple versions on the same end-point. The only way for client to find out what versions a server supports in this fashion is the $versions operation. The client invokes the operation with no parameters. and the server returns the list of supported versions, along with the default version it will use if no fhirVersion parameter is present.
The canonical URL for this operation definition is
http://hl7.org/fhir/OperationDefinition/CapabilityStatement-versions
Formal Definition (as a OperationDefinition).
URL: [base]/$versions
This is an idempotent operation
Out Parameters: | ||||||
Name | Scope | Cardinality | Type | Binding | Profile | Documentation |
version | 1..* | code | A version supported by the server. Use the major.minor version like 3.0 | |||
default | 1..1 | code | FHIRVersion (Required) | The default version for the server. Use the major.minor version like 3.0 |
Request: Request a list of versions supported by the server
GET [base]/$versions Accept: application/fhir+xml [other headers]
Response:
HTTP/1.1 200 OK [other headers] <Parameters xmlns="http://hl7.org/fhir"> <parameter> <name value="version"/> <valueCode value="3.0"/> </parameter> <parameter> <name value="version"/> <valueCode value="4.0"/> </parameter> <parameter> <name value="default"/> <valueCode value="4.0"/> </parameter> </Parameters> or in JSON: { "resourceType": "Parameters", "parameter": [{ "name": "version", "valueCode": "3.0" }, { "name": "version", "valueCode": "4.0" }, { "name": "default", "valueCode": "4.0" }] }
For the convenience of clients, servers that implement this operation SHALL also support the relevant XML or JSON format:
Request: Request a list of versions supported by the server
GET [base]/$versions Accept: application/json [other headers] or GET [base]/$versions Accept: application/xml [other headers]
Response:
HTTP/1.1 200 OK [other headers] { "versions": ["3.0", "4.0"], "default" : "4.0" } on in XML: <versions> <version>3.0</version> <version>4.0</version> <default>4.0</default> </versions>
For more information about operations, including how they are invoked, see Operations.