# Method: projects.cryptoKeys.list

- [HTTP request](https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys/list#body.request_body)
- [Response body](https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys/list#body.ListCryptoKeysResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys/list#body.aspect)
- [Try it!](https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys/list#try-it)

Returns cryptographic keys managed by Cloud KMS in a given Cloud project. Note that this data is sourced from snapshots, meaning it may not completely reflect the actual state of key metadata at call time.

### HTTP request

`GET https://kmsinventory.googleapis.com/v1/{parent=projects/*}/cryptoKeys`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The Google Cloud project for which to retrieve key metadata, in the format `projects/*` Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `cloudkms.cryptoKeys.list` |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. The maximum number of keys to return. The service may return fewer than this value. If unspecified, at most 1000 keys will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| `pageToken` | `string` Optional. Pass this into a subsequent request in order to receive the next page of results. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains data with the following structure:
Response message for `https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys/list#google.cloud.kms.inventory.v1.KeyDashboardService.ListCryptoKeys`.

| JSON representation |
|---|
| ``` { "cryptoKeys": [ { object (`https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys#CryptoKey`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `cryptoKeys[]` | ``object (`https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys#CryptoKey`)`` The list of `https://docs.cloud.google.com/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys#CryptoKey`. |
| `nextPageToken` | `string` The page token returned from the previous response if the next page is desired. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).