# Method: projects.locations.templates.search

- [HTTP request](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/search#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/search#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/search#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/search#body.request_body)
- [Response body](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/search#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/search#body.SearchTemplatesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/search#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/search#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/search#try-it)

Search templates based on user query and filters. This api would query the templates and return a list of templates based on the user filter.

### HTTP request

`GET https://integrations.googleapis.com/v1/{parent=projects/*/locations/*}/templates:search`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The client, which owns this collection of Templates. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. The size of the response entries. If unspecified, defaults to 100. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| `pageToken` | `string` Optional. The token returned in the previous response. |
| `filter` | `string` Optional. Standard filter field to filter templates. clientId filter won't be supported and will restrict to templates belonging to the current client only. Return all templates of the current client if the filter is empty. Also supports operators like AND, OR, NOT For example, "status="ACTIVE" |
| `orderBy` | `string` Optional. The results would be returned in the order you specified here. |
| `readMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Optional. The mask which specifies fields that need to be returned in the template's response. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |
| `query` | `string` Optional. The search query that will be passed to Vertex search service. |
| `enableNaturalLanguageQueryUnderstanding` | `boolean` Optional. Whether to enable natural language query understanding. |

### Request body

The request body must be empty.

### Response body

Response for a request to search templates

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

| JSON representation |
|---|
| ``` { "templates": [ { object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Template`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `templates[]` | ``object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Template`)`` List of templates retrieved. |
| `nextPageToken` | `string` The token used to retrieve the next page results. |

### Authorization scopes

Requires the following OAuth scope:

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

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:

- `integrations.templates.list`

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