- [HTTP request](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#body.request_body)
- [Response body](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#body.ListActiveCannedQueryUserViewsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#body.aspect_1)
- [CannedQueryUserView](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#CannedQueryUserView)
  - [JSON representation](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#CannedQueryUserView.SCHEMA_REPRESENTATION)

Lists the `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#CannedQueryUserView`s for all active `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries#CannedQuery`s.

### HTTP request

Choose an endpoint:
global us   
`GET https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*/assistants/*}/cannedQueries:listActiveCannedQueryUserViews`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The resource name of the parent assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` |

### Query parameters

| Parameters ||
|---|---|
| `languageCode` | `string` Optional. The language code the canned queries should be returned in. If not specified here or corresponding translation is not found, the default texts will be returned. |
| `pageSize` | `integer` Maximum number of `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#CannedQueryUserView`s to return. If unspecified, defaults to 100. The maximum allowed value is 1000; anything above that will be coerced down to 1000. |
| `pageToken` | `string` A page token `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#body.ListActiveCannedQueryUserViewsResponse.FIELDS.next_page_token`, received from a previous `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#google.cloud.discoveryengine.v1alpha.CannedQueryService.ListActiveCannedQueryUserViews` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#google.cloud.discoveryengine.v1alpha.CannedQueryService.ListActiveCannedQueryUserViews` must match the call that provided the page token. |

### Request body

The request body must be empty.

### Response body

Response message for `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#google.cloud.discoveryengine.v1alpha.CannedQueryService.ListActiveCannedQueryUserViews` method.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "cannedQueryUserViews": [ { object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#CannedQueryUserView`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `cannedQueryUserViews[]` | ``object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#CannedQueryUserView`)`` The `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#CannedQueryUserView`s that are representing active (existing, enabled and capabilities met) canned queries. |
| `nextPageToken` | `string` A token that can be sent as `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries/listActiveCannedQueryUserViews#body.QUERY_PARAMETERS.page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/discoveryengine.assist.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.serving.readwrite`

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

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `discoveryengine.cannedQueries.listActiveCannedQueryUserViews`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## CannedQueryUserView

Limited information about a `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries#CannedQuery` that is sufficient for the end users.

| JSON representation |
|---|
| ``` { "cannedQuery": string, "localizedTexts": { object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries#CannedQueryTexts`) } } ``` |

| Fields ||
|---|---|
| `cannedQuery` | `string` The resource name of the `CannedQuery` this view is for. This identifies the canned query in the assist request. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/cannedQueries/{cannedQuery}` |
| `localizedTexts` | ``object (`https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants.cannedQueries#CannedQueryTexts`)`` The localized texts for the canned query. |