---
title: "GET /v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/scans"
method: GET
path: "/v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/scans"
tags: ["projects"]
---

# GET /v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/scans

`GET /v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/scans`

## Request

- Base URL: `https://spanner.googleapis.com`
- URL: `https://spanner.googleapis.com/v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/scans`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/spanner.data`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/spanner.data`

Request a specific scan with Database-specific data for Cloud Key Visualizer.

## Path parameters

- `projectsId` string, required
- `instancesId` string, required
- `databasesId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `endTime` string, google-datetime
- `startTime` string, google-datetime
- `view` 'VIEW_UNSPECIFIED' | 'SUMMARY' | 'FULL'

## Response `200`

Successful response

- Scan: Scan is a structure which describes Cloud Key Visualizer scan information.
  - `details` object: Additional information provided by the implementer.
  - `endTime` string, google-datetime: The upper bound for when the scan is defined.
  - `name` string: The unique name of the scan, specific to the Database service implementing this interface.
  - `scanData` ScanData: ScanData contains Cloud Key Visualizer scan data used by the caller to construct a visualization.
    - `data` VisualizationData
      - `dataSourceEndToken` string: The token signifying the end of a data_source.
      - `dataSourceSeparatorToken` string: The token delimiting a datasource name from the rest of a key in a data_source.
      - `diagnosticMessages` DiagnosticMessage[]: The list of messages (info, alerts, ...)
        - `info` LocalizedString: A message representing a user-facing string whose value may need to be translated before being displayed.
          - `args` object: A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
          - `message` string: The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
          - `token` string: The token identifying the message, e.g. 'METRIC_READ_CPU'. This should be unique within the service.
        - `metric` LocalizedString: A message representing a user-facing string whose value may need to be translated before being displayed.
          - `args` object: A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
          - `message` string: The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
          - `token` string: The token identifying the message, e.g. 'METRIC_READ_CPU'. This should be unique within the service.
        - `metricSpecific` boolean: Whether this message is specific only for the current metric. By default Diagnostics are shown for all metrics, regardless which metric is the currently selected metric in the UI. However occasionally a metric will generate so many messages that the resulting visual clutter becomes overwhelming. In this case setting this to true, will show the diagnostic messages for that metric only if it is the currently selected metric.
        - `severity` 'SEVERITY_UNSPECIFIED' | 'INFO' | 'WARNING' | 'ERROR' | 'FATAL': The severity of the diagnostic message.
        - `shortMessage` LocalizedString: A message representing a user-facing string whose value may need to be translated before being displayed.
          - `args` object: A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
          - `message` string: The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
          - `token` string: The token identifying the message, e.g. 'METRIC_READ_CPU'. This should be unique within the service.
      - `endKeyStrings` string[]: We discretize the entire keyspace into buckets. Assuming each bucket has an inclusive keyrange and covers keys from k(i) ... k(n). In this case k(n) would be an end key for a given range. end_key_string is the collection of all such end keys
      - `hasPii` boolean: Whether this scan contains PII.
      - `indexedKeys` string[]: Keys of key ranges that contribute significantly to a given metric Can be thought of as heavy hitters.
      - `keySeparator` string: The token delimiting the key prefixes.
      - `keyUnit` 'KEY_UNIT_UNSPECIFIED' | 'KEY' | 'CHUNK': The unit for the key: e.g. 'key' or 'chunk'.
      - `metrics` Metric[]: The list of data objects for each metric.
        - `aggregation` 'AGGREGATION_UNSPECIFIED' | 'MAX' | 'SUM': The aggregation function used to aggregate each key bucket
        - `category` LocalizedString: A message representing a user-facing string whose value may need to be translated before being displayed.
          - `args` object: A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
          - `message` string: The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
          - `token` string: The token identifying the message, e.g. 'METRIC_READ_CPU'. This should be unique within the service.
        - `derived` DerivedMetric: A message representing a derived metric.
          - `denominator` LocalizedString: A message representing a user-facing string whose value may need to be translated before being displayed.
            - `args` object: A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
            - `message` string: The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
            - `token` string: The token identifying the message, e.g. 'METRIC_READ_CPU'. This should be unique within the service.
          - `numerator` LocalizedString: A message representing a user-facing string whose value may need to be translated before being displayed.
            - `args` object: A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
            - `message` string: The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
            - `token` string: The token identifying the message, e.g. 'METRIC_READ_CPU'. This should be unique within the service.
        - `displayLabel` LocalizedString: A message representing a user-facing string whose value may need to be translated before being displayed.
          - `args` object: A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
          - `message` string: The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
          - `token` string: The token identifying the message, e.g. 'METRIC_READ_CPU'. This should be unique within the service.
        - `hasNonzeroData` boolean: Whether the metric has any non-zero data.
        - `hotValue` number, float: The value that is considered hot for the metric. On a per metric basis hotness signals high utilization and something that might potentially be a cause for concern by the end user. hot_value is used to calibrate and scale visual color scales.
        - `indexedHotKeys` object: The (sparse) mapping from time index to an IndexedHotKey message, representing those time intervals for which there are hot keys.
        - `indexedKeyRangeInfos` object: The (sparse) mapping from time interval index to an IndexedKeyRangeInfos message, representing those time intervals for which there are informational messages concerning key ranges.
        - `info` LocalizedString: A message representing a user-facing string whose value may need to be translated before being displayed.
          - `args` object: A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
          - `message` string: The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
          - `token` string: The token identifying the message, e.g. 'METRIC_READ_CPU'. This should be unique within the service.
        - `matrix` MetricMatrix: A message representing a matrix of floats.
          - `rows` MetricMatrixRow[]: The rows of the matrix.
            - `cols` number[]: The columns of the row.
        - `unit` LocalizedString: A message representing a user-facing string whose value may need to be translated before being displayed.
          - `args` object: A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
          - `message` string: The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
          - `token` string: The token identifying the message, e.g. 'METRIC_READ_CPU'. This should be unique within the service.
        - `visible` boolean: Whether the metric is visible to the end user.
      - `prefixNodes` PrefixNode[]: The list of extracted key prefix nodes used in the key prefix hierarchy.
        - `dataSourceNode` boolean: Whether this corresponds to a data_source name.
        - `depth` integer: The depth in the prefix hierarchy.
        - `endIndex` integer: The index of the end key bucket of the range that this node spans.
        - `startIndex` integer: The index of the start key bucket of the range that this node spans.
        - `word` string: The string represented by the prefix node.
    - `endTime` string, google-datetime: The upper bound for when the contained data is defined.
    - `startTime` string, google-datetime: A range of time (inclusive) for when the contained data is defined. The lower bound for when the contained data is defined.
  - `startTime` string, google-datetime: A range of time (inclusive) for when the scan is defined. The lower bound for when the scan is defined.

## Changes

- **2026-12-05** `a7213b86b5d7`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/spanner.data` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/spanner.data` was removed from the endpoint's security scheme `Oauth2c`
- **2026-11-20** `54a0040f5251`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/spanner.data` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/spanner.data` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/spanner/changes/v1/projects/:projectsId/instances/:instancesId/databases/:databasesId/scans/get.md)

---

[API](https://skmtc.dev/google/apis/spanner.md) - [All operations](https://skmtc.dev/google/apis/spanner/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/spanner/revisions/a7213b86b5d7?raw)
