Get Capability Statement
curl --request GET \
--url http://localhost:8080/fhir/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8080/fhir/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8080/fhir/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"resourceType": "CapabilityStatement",
"status": "draft",
"date": "2023-11-07T05:31:56Z",
"kind": "instance",
"software": {
"name": "<string>",
"version": "<string>"
},
"fhirVersion": "<string>",
"format": [
"<string>"
],
"rest": [
{}
]
}Metadata
Capability Statement
Get server capabilities and configuration
GET
/
metadata
Get Capability Statement
curl --request GET \
--url http://localhost:8080/fhir/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8080/fhir/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8080/fhir/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"resourceType": "CapabilityStatement",
"status": "draft",
"date": "2023-11-07T05:31:56Z",
"kind": "instance",
"software": {
"name": "<string>",
"version": "<string>"
},
"fhirVersion": "<string>",
"format": [
"<string>"
],
"rest": [
{}
]
}Capability Statement
Retrieve the server’s capability statement, which describes the server’s capabilities, supported resources, search parameters, and operations.Endpoint
GET /fhir/metadata
Example Request
curl -H "Accept: application/fhir+json" \
https://your-server.com/fhir/metadata
GET /fhir/metadata HTTP/1.1
Host: your-server.com
Accept: application/fhir+json
Response
Success (200 OK)
Returns aCapabilityStatement resource:
{
"resourceType": "CapabilityStatement",
"status": "active",
"date": "2024-01-01T12:00:00Z",
"kind": "instance",
"software": {
"name": "Ferrum",
"version": "1.0.0"
},
"implementation": {
"url": "https://your-server.com/fhir",
"description": "Ferrum Implementation"
},
"fhirVersion": "4.0.1",
"format": [
"application/fhir+json",
"application/fhir+xml"
],
"rest": [
{
"mode": "server",
"resource": [
{
"type": "Patient",
"interaction": [
{
"code": "read"
},
{
"code": "vread"
},
{
"code": "update"
},
{
"code": "patch"
},
{
"code": "delete"
},
{
"code": "history-instance"
},
{
"code": "history-type"
},
{
"code": "create"
},
{
"code": "search-type"
}
],
"searchParam": [
{
"name": "name",
"type": "string",
"documentation": "A server defined search that may match any of the string fields in the HumanName, including family, given, prefix, suffix, and/or text"
},
{
"name": "identifier",
"type": "token",
"documentation": "A patient identifier"
}
]
}
]
}
]
}
Capability Statement Structure
The capability statement includes:Software Information
software.name- Server namesoftware.version- Server versionsoftware.releaseDate- Release date
Implementation Details
implementation.url- Base URLimplementation.description- Implementation description
Supported Formats
format- List of supported content types (JSON, XML, etc.)
REST Capabilities
rest.mode- Server mode (serverorclient)rest.resource- List of supported resources
Resource Capabilities
For each resource type:type- Resource type nameinteraction- Supported interactions (read, create, update, delete, search, etc.)searchParam- Supported search parametersoperation- Supported operationsversioning- Versioning support (versioned,versioned-update,no-version,versioned)readHistory- Whether history is supportedupdateCreate- Whether updates can create resourcesconditionalCreate- Whether conditional create is supportedconditionalUpdate- Whether conditional update is supportedconditionalDelete- Whether conditional delete is supported
Operations
rest.operation- System-level operationsrest.resource[].operation- Resource-specific operations
Use Cases
Use the capability statement to:- Discover which resources are supported
- Learn which search parameters are available
- Check which operations are supported
- Determine versioning behavior
- Understand server capabilities before making requests
Notes
- The capability statement is always available at
/fhir/metadata - It reflects the current server configuration
- Use it to build dynamic clients that adapt to server capabilities
- The statement may change as the server is updated or configured
Authorizations
Bearer token authentication
Response
Capability statement
A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server
Available options:
CapabilityStatement Available options:
draft, active, retired, unknown Available options:
instance, capability, requirements Show child attributes
Show child attributes