This page is part of the FHIR Specification (v4.6.0: R5 Draft Ballot - 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
FHIR Infrastructure Work Group | Maturity Level: 0 | 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 official URL for this operation definition is
http://hl7.org/fhir/OperationDefinition/CapabilityStatement2-versions
Formal Definition (as a OperationDefinition).
URL: [base]/$versions
This is an idempotent operation
Out Parameters: | |||||
Name | 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 | 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"/> <valueString value="3.0"/> </parameter> <parameter> <name value="version"/> <valueString value="4.0"/> </parameter> <parameter> <name value="default"/> <valueString value="4.0"/> </parameter> </Parameters> or in JSON: { "resourceType": "Parameters", "parameter": [{ "name": "version", "valueString": "3.0" }, { "name": "version", "valueString": "4.0" }, { "name": "default", "valueString": "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.