View FHIR store metrics Stay organized with collections Save and categorize content based on your preferences.
This page explains how to view the following metrics about a FHIR store:
- The types of FHIR resources in the FHIR store
- The number of each type of resource
- The size of the data in the FHIR store
- The size of the data version history in the FHIR store
You can use the metrics to do the following:
- Estimate future costs based on current usage.
- Track how the FHIR store is growing and changing over time.
- Ensure that the number of FHIR resources in a FHIR store matches the numberyouimported,created using a bundle, orde-identified.
When you add or change FHIR resources, the resources are addedto the FHIR store asynchronously. There might be a delaybetween when you make a change and when it appears in the metrics.
The following examples show how to view the metrics about a FHIR store.
Console
In the Google Cloud console, go to theDatasets page.
Select the dataset containing the FHIR store whose metrics you want to view.TheData stores page is displayed.
In theData stores list, select the FHIR store whose metrics you wantto view. TheData store details page is displayed.
Click theMetrics tab. The tab shows the following metrics:
- Total number of resource types
- Total number of resources
- Total size of all resources
- Total size of all versioned resources
View and filter metrics in theMetrics table. After you filter metrics,select a FHIR resource type to view information about all resources ofthat type in theFHIR viewer.
gcloud
Run thegcloud healthcare fhir-stores metrics command.
Before using any of the command data below, make the following replacements:
- PROJECT_ID: the ID of your Google Cloud project
- LOCATION: the dataset location
- DATASET_ID: the FHIR store's parent dataset
- FHIR_STORE_ID: the FHIR store ID
Execute the following command:
Linux, macOS, or Cloud Shell
Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.gcloudhealthcarefhir-storesmetricsFHIR_STORE_ID\--project=PROJECT_ID\--location=LOCATION\--dataset=DATASET_ID
Windows (PowerShell)
Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.gcloudhealthcarefhir-storesmetricsFHIR_STORE_ID`--project=PROJECT_ID`--location=LOCATION`--dataset=DATASET_ID
Windows (cmd.exe)
Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.gcloudhealthcarefhir-storesmetricsFHIR_STORE_ID^--project=PROJECT_ID^--location=LOCATION^--dataset=DATASET_ID
You should receive a response similar to the following:
Response
metrics:- count: 'FHIR_RESOURCE_TYPE_COUNT' resourceType:FHIR_RESOURCE_TYPE structuredStorageSizeBytes: 'FHIR_RESOURCE_TYPE_SIZE' versionedStorageSizeBytes: 'FHIR_RESOURCE_TYPE_VERSIONED_SIZE'...name: projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID
REST
Use thefhirStores.getFHIRStoreMetricsmethod.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the ID of your Google Cloud project
- LOCATION: the dataset location
- DATASET_ID: the FHIR store's parent dataset
- FHIR_STORE_ID: the FHIR store ID
To send your request, choose one of these options:
curl
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID:getFHIRStoreMetrics"
PowerShell
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID:getFHIRStoreMetrics" | Select-Object -Expand Content
APIs Explorer
Open themethod reference page. The APIs Explorer panel opens on the right side of the page. You can interact with this tool to send requests. Complete any required fields and clickExecute.
You should receive a JSON response similar to the following:
Response
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/fhirStores/FHIR_STORE_ID", "metrics": [ { "resourceType": "FHIR_RESOURCE_TYPE", "count": "FHIR_RESOURCE_TYPE_COUNT", "structuredStorageSizeBytes": "FHIR_RESOURCE_TYPE_SIZE", "versionedStorageSizeBytes": "FHIR_RESOURCE_TYPE_VERSIONED_SIZE" }, ... ]}Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-18 UTC.