API
Trifolia includes limited functionality for the FHIR REST API.
Versions
Trifolia supports three different versions of the FHIR REST API for backwards compatibility. However, only the latest version is actively developed and improved.
Each of the base endpoints correlate to their version of the FHIR standard:
Version |
Endpoint |
Notes |
DSTU2 |
/api/FHIR2 |
No longer maintained |
STU3 |
/api/FHIR3 |
Issues maintained upon request |
Current Build |
/api/FHIRCurrentBuild |
Current, actively maintained |
Additionally, each of these endpoints correlate to the appropriate Implementation Guide Type in Trifolia. For example, only Implementation Guides associated with the Implementation Guide Type "FHIR Latest" will be returned by requests to the /api/FHIR3 endpoint. Similarly, only Implementation Guides associated with the Implementation Guide Type "FHIR DSTU2" will be returned by the /api/FHIR2 endpoint.
Authentication
All REST endpoints are authenticated with OAuth 2.0 using a Authentication header with a "Bearer" token.
To get a token to use for authentication, login to Trifolia and click on the "My Profile" menu under your name in the top-right corner. In the "My Profile" page, the authentication token for your logged-in user will be shown in a separate panel.
Use the authentication token in the "My Profile" page in REST API calls by adding an "Authorization" header with a value of "Bearer <TOKEN>".
Customizations
- StructureDefinition.id cannot exist in the Profile when performing a POST
- StructureDefinition.id must not be changed when performing a PUT
Supported Operations
See Developer Docs for more details.
Method |
Endpoint |
GET |
/api/FHIR3/metadata /api/FHIR3/CapabilityStatement |
GET |
/api/FHIR3/ImplementationGuide /api/FHIR3/ImplementationGuide/_search |
GET PUT DELETE |
/api/FHIR3/ImplementationGuide/{implementationGuideId} |
POST |
/api/FHIR3/ImplementationGuide |
GET |
/api/FHIR3/StructureDefinition /api/FHIR3/StructureDefinition/_search |
GET PUT DELETE |
/api/FHIR3/StructureDefinition/{id} |
POST |
/api/FHIR3/StructureDefinition |
GET |
/api/FHIR3/ValueSet /api/FHIR3/ValueSet/_search |
GET PUT |
/api/FHIR3/ValueSet/{id} |
POST |
/api/FHIR3/ValueSet |