JFT ReadAPI Overview
Note
Some of the features are not implemented yet. See Roadmap and the OpenApi docs for latest status.
The ReadAPI includes endpoints for retrieving events and event status. As suggested by FHIR, the resource types used to represent events are a part of the endpoint addresses. The resource types currently supported are:
- Bundle
- Composition
- MedicationDispense
Retrieving events
Event retrieval is done by making POST-requests to the _search endpoints.
POSTis used to avoid problems related to URL length limitations, while still supporting complex queries.- Pagination is used to limit the amount of events returned per request.
- Parameter
_lastUpdatedis used to limit the result set based on when events were updated in JFT.
The endpoints are on the format: POST /v1/<ResourceType>/_search
For example: POST /v1/Composition/_search retrieves events submitted as a FHIR Composition resource
Retrieving event status
The status of a specific event is retrieved by making GET-requests to the $status endpoints.
The endpoints are on the format: GET /v1/<ResourceType>/<ResourceId>/$status
For example: GET /v1/Bundle/123/$status retrieves status for an event submitted as a FHIR Bundle resource with resource ID 123
(resource IDs are actually represented as GUIDs).
The response to a successful status requests is a simple JSON object (i.e. not a FHIR resource):
{
"registered": "2025-02-14T12:01:02+01:00",
"read": "2025-02-14T13:13:13+01:00",
"journaled" : "2025-02-10T18:17:16+01:00",
"failed": null
}
The fields mean:
registered: The time when a submitted event was processed by JFT.read: The time when the event was retrieved for the first time (or null if unread).journaled: The time when an journaling acknowledgement was submitted for the event (or null if not ack'ed)failed: To be defined
Required claim
The orgnr_parent claim is required in the access token for all endpoints.
Its value must be the organization number of the municipality's main entity.