Skip to content

Operation $system-stats

The Statistics operation is a simple operation that returns the number of FHIR resources in Kodjin DB. The response returns count and size for each ResourceType in DataBase together with some additional metadata.

The current operation provides an encrypted response to ensure security, so the route could be open if that is needed. The response is encrypted using a key pair, consisting of a public and private key. This key pair should be generated before deploying the Kodjin FHIR server.

Endpoints

POST [base]/$system-stats

Out Parameters

Name Cardinality Type Documentation
metadata.datetime 1..1 dateTime the datetime of the operation
metadata.software.version 1..1 string
metadata.software.name 1..1 string
metadata.fhirVersion 1..1 string
metadata.tenant 1..1 string
metadata.url 1..1 string
resources 0..* The list containing the stats on each resource type
resources[].resourceType 1..1 string FHIR Resource type
resources[].size 1..1 string size of collection in kb
resources[].count 1..1 positiveInt the number of resources in DB

Example

Example of decrypted response

    {
        "metadata": {
            "dateTime": "2024-05-15T11:11:00.036150017+00:00",
            "software": {
                "version": "v4.3.0",
                "name": "Kodjin FHIR Server"
            },
            "fhirVersion": "4.0.1",
            "tenant": "kodjin.bootstrap.infra",
            "url": "https://demo.kodjin.com/"
        },
        "resources": [
            {
                "resourceType": "Account",
                "size": "2263",
                "count": 2
            }
        ]
    }