Skip to main content

CapabilityStatement

GET /metadata returns a FHIR CapabilityStatement describing what the running server actually supports. It is generated at request time from the live search-parameter registry and the Implementation Guide packages loaded at startup — not from a static file — so it always reflects that deployment.

Request
curl -sS http://localhost:9090/fhir/r4/metadata | jq
tip

Treat /metadata as authoritative over any documentation, including this site. A deployment that loads Implementation Guides or defines custom SearchParameter resources supports more than the shipped defaults.

Server-level fields​

FieldValue on a default deployment
fhirVersion4.0.1
status / kindactive / instance
formatapplication/fhir+json, application/fhir+xml, application/fhir+turtle
patchFormatapplication/json-patch+json, application/merge-patch+json, application/xml-patch+xml, application/fhir+json, application/fhir+xml
rest[0].modeserver
rest[0].interactiontransaction, batch, history-system
rest[0].operationthe server's operations
implementationGuidecanonical URL per loaded package
softwarename and version of the build

Per-resource entries​

rest[0].resource carries one entry per resource type the registry knows, which is the full FHIR R4 base set plus anything contributed by loaded IG packages.

Request
# how many resource types this server exposes
curl -sS http://localhost:9090/fhir/r4/metadata | jq '.rest[0].resource | length'
Response
135

Every R4 resource type can be stored, read, and searched. This count is the number of types the server advertises with search parameters; see Resource types.

Each entry reports:

FieldMeaning
interactionread, vread, update, patch, delete, create, search-type
versioningversioned — every write appends a retrievable version
readHistorytrue — past versions are readable via history and vread
conditionalCreate / conditionalUpdatetrue — see Conditional operations
conditionalDeletesingle — a conditional delete may match at most one resource
updateCreatetrue — PUT to an unknown id creates the resource (update-as-create)
referencePolicyliteral, logical — both Type/id and identifier-based references are indexed — plus enforced while referential-integrity checking on write is enabled (the default)
searchParamevery parameter available for the type, base plus IG plus custom
searchIncludereference parameters usable as _include targets
searchRevIncludeparameters usable as _revinclude targets
supportedProfileprofiles contributed by loaded IGs, when present
Request
curl -sS http://localhost:9090/fhir/r4/metadata \
| jq '.rest[0].resource[] | select(.type=="Patient") |
{conditionalCreate, conditionalUpdate, conditionalDelete, updateCreate, versioning, readHistory, referencePolicy}'
Response
{
"conditionalCreate": true,
"conditionalUpdate": true,
"conditionalDelete": "single",
"updateCreate": true,
"versioning": "versioned",
"readHistory": true,
"referencePolicy": ["literal", "logical", "enforced"]
}

Useful queries​

Confirm a specific search parameter is available before a client relies on it:

Request
curl -sS http://localhost:9090/fhir/r4/metadata \
| jq '.rest[0].resource[] | select(.type=="Observation") | [.searchParam[].name]'
Response
[
"_id", "_lastUpdated", "_text", "_content", "_tag", "_profile", "_security",
"_source", "_language", "_list", "based-on", "category", "code", "date",
"patient", "subject", "value-quantity"
]

List the operations this server advertises:

Request
curl -sS http://localhost:9090/fhir/r4/metadata | jq '[.rest[0].operation[].name] | unique'
Response
["convert", "document", "everything", "lastn", "meta", "meta-add", "meta-delete", "validate"]

Verify which Implementation Guides loaded successfully:

Request
curl -sS http://localhost:9090/fhir/r4/metadata | jq '.implementationGuide'
Response
[]

An empty array means no Implementation Guides are loaded. See Implementation Guides.

Check the profiles a type is constrained by:

Request
curl -sS http://localhost:9090/fhir/r4/metadata \
| jq '.rest[0].resource[] | select(.type=="Patient") | .supportedProfile'
Response
null

supportedProfile is absent until an IG contributing profiles for that type is loaded.

Format negotiation​

/metadata honours the same content negotiation as every other endpoint:

Request
curl -sS -H 'Accept: application/fhir+xml' http://localhost:9090/fhir/r4/metadata
Response
<?xml version="1.0" encoding="UTF-8"?>
<CapabilityStatement xmlns="http://hl7.org/fhir">
<status value="active"></status>
<kind value="instance"></kind>
<fhirVersion value="4.0.1"></fhirVersion>
...
</CapabilityStatement>

In multi-tenant deployments​

Requesting /metadata under a tenant prefix returns the same capability set with tenant-aware URLs:

Request
curl -sS http://localhost:9090/t/acme/fhir/r4/metadata | jq '.rest[0].resource | length'
Response
135

See Multi-tenancy.