This page describes how to view DICOM store, DICOM study, and DICOM series
metrics. You can use these metrics to do the following:

- Estimate future costs based on current usage.
- Track how a DICOM store grows and changes over time.
- Ensure that the number of DICOM instances matches the number that you [imported](https://docs.cloud.google.com/healthcare-api/docs/how-tos/dicom-import-export.md.txt).

Modifications to DICOM data, such as storing or deleting the data,
are asynchronous. There might be a delay
between when you modify the data and when the modifications are shown
in the DICOM store metrics.

## Storage types

Several metrics show the size, in bytes, of the following [data storage](https://cloud.google.com/healthcare-api/pricing#data_storage)
classes:

Blob storage
:   Unstructured DICOM data and DICOM data that uses *blob bytes*.

Structured storage
:   Non-blob storage data, such as searchable metadata.

## View DICOM store metrics

The following samples show how to view DICOM store metrics.

### Console

1. In the Google Cloud console, go to the **Datasets** page.

   [Go to Datasets](https://console.cloud.google.com/healthcare/browser)
2. Select the dataset containing the DICOM store whose metrics you want to view.

3. In the **Data stores** list, select the DICOM store whose metrics you want
   to view. The **Data store details** page is displayed.

4. Click the **Metrics** tab.

   The tab shows the following metrics on a scorecard:
   - **Total number of studies**
   - **Total number of series**
   - **Total number of instances**
   - **Structured storage size of all instances**
   - **Blob storage size of all instances**
   - **Total size of all instances**

   The metrics table contains the following columns:

   | Column | Description |
   |---|---|
   | `ID` | The study IDs and the series IDs. Expand a study entry to view the series within the study. |
   | `Number of series` | The number of series within a study. |
   | `Number of instances` | The number of instances within a study or within a series. |
   | `Structured size` | The size of the structured data in the study or the series. |
   | `Blob size` | The size of the blob data in the study or the series. |

5. To filter the table data, enter the study ID in the **Filter** field.

### REST

Use the [`dicomStores.getDICOMStoreMetrics`](https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.dicomStores/getDICOMStoreMetrics.md.txt)
method.


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 DICOM store's parent dataset
- `DICOM_STORE_ID`: the DICOM store ID

To send your request, choose one of these options:

#### curl

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) , or by using [Cloud Shell](https://docs.cloud.google.com/shell/docs.md.txt), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


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/dicomStores/DICOM_STORE_ID:getDICOMStoreMetrics"
```

#### PowerShell

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


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/dicomStores/DICOM_STORE_ID:getDICOMStoreMetrics" | Select-Object -Expand Content
```

#### APIs Explorer


Open the

[method reference page](https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.dicomStores/getDICOMStoreMetrics.md.txt).
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 click **Execute**.

You should receive a JSON response similar to the following:

#### Response

```
{
  "name": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID",
  "studyCount": "STUDY_COUNT",
  "seriesCount": "SERIES_COUNT",
  "instanceCount": "INSTANCE_COUNT",
  "structuredStorageSizeBytes": "STRUCTURED_STORAGE_BYTES",
  "blobStorageSizeBytes": "BLOB_STORAGE_BYTES",
}
```

<br />

## View DICOM studies metrics

The following samples show how to view DICOM studies metrics.

### Console

To view DICOM study metrics in the Google Cloud console, see
[View DICOM store metrics](https://docs.cloud.google.com/healthcare-api/docs/dicom-store-metrics.md.txt#dicom-store-get-metrics-console).

### REST

Use the [`dicomStores.studies.getStudyMetrics`](https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.dicomStores.dicomWeb.studies/getStudyMetrics.md.txt)
method.


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 DICOM store's parent dataset
- `DICOM_STORE_ID`: the DICOM store ID
- `STUDY_UID`: the DICOMweb study unique identifier (UID)

To send your request, choose one of these options:

#### curl

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) , or by using [Cloud Shell](https://docs.cloud.google.com/shell/docs.md.txt), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


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/dicomStores/DICOM_STORE_ID/dicomWeb/studies/STUDY_UID:getStudyMetrics"
```

#### PowerShell

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


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/dicomStores/DICOM_STORE_ID/dicomWeb/studies/STUDY_UID:getStudyMetrics" | Select-Object -Expand Content
```

#### APIs Explorer


Open the

[method reference page](https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.dicomStores.dicomWeb.studies/getStudyMetrics.md.txt).
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 click **Execute**.

You should receive a JSON response similar to the following:

#### Response

```
{
  "study": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID/dicomWeb/studies/STUDY_UID",
  "seriesCount": "SERIES_COUNT",
  "instanceCount": "INSTANCE_COUNT",
  "structuredStorageSizeBytes": "STRUCTURED_STORAGE_BYTES",
  "blobStorageSizeBytes": "BLOB_STORAGE_BYTES"
}
```

<br />

## View DICOM series metrics

The following samples show how to view DICOM series metrics.

### Console

To view DICOM series metrics in the Google Cloud console, see
[View DICOM store metrics](https://docs.cloud.google.com/healthcare-api/docs/dicom-store-metrics.md.txt#dicom-store-get-metrics-console).

### REST

Use the [`dicomStores.dicomWeb.studies.series.getSeriesMetrics`](https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.dicomStores.dicomWeb.studies.series/getSeriesMetrics.md.txt)
method.


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 DICOM store's parent dataset
- `DICOM_STORE_ID`: the DICOM store ID
- `STUDY_UID`: the DICOMweb study unique identifier (UID)
- `SERIES_UID`: the DICOMweb series unique identifier (UID)

To send your request, choose one of these options:

#### curl

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) , or by using [Cloud Shell](https://docs.cloud.google.com/shell/docs.md.txt), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


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/dicomStores/DICOM_STORE_ID/dicomWeb/studies/STUDY_UID/series/SERIES_UID:getSeriesMetrics"
```

#### PowerShell

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


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/dicomStores/DICOM_STORE_ID/dicomWeb/studies/STUDY_UID/series/SERIES_UID:getSeriesMetrics" | Select-Object -Expand Content
```

#### APIs Explorer


Open the

[method reference page](https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.dicomStores.dicomWeb.studies.series/getSeriesMetrics.md.txt).
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 click **Execute**.

You should receive a JSON response similar to the following:

#### Response

```
{
  "series": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID/dicomWeb/studies/STUDY_UID/series/SERIES_UID",
  "structuredStorageSizeBytes": "STRUCTURED_STORAGE_BYTES",
  "blobStorageSizeBytes": "BLOB_STORAGE_BYTES",
  "instanceCount": "INSTANCE_COUNT"
}
```

<br />