# REST Resource: projects.locations.templates

- [Resource: Template](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Template)
  - [JSON representation](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Template.SCHEMA_REPRESENTATION)
- [TemplateBundle](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#TemplateBundle)
  - [JSON representation](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#TemplateBundle.SCHEMA_REPRESENTATION)
- [IntegrationVersionTemplate](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#IntegrationVersionTemplate)
  - [JSON representation](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#IntegrationVersionTemplate.SCHEMA_REPRESENTATION)
- [Component](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Component)
  - [JSON representation](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Component.SCHEMA_REPRESENTATION)
- [Type](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Type)
- [Category](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Category)
- [Visibility](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Visibility)
- [Methods](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#METHODS_SUMMARY)

## Resource: Template

Defines the template for Application Integration

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string, "usageInfo": string, "docLink": string, "templateBundle": { object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#TemplateBundle`) }, "components": [ { object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Component`) } ], "tags": [ string ], "categories": [ enum (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Category`) ], "createTime": string, "updateTime": string, "author": string, "usageCount": string, "lastUsedTime": string, "visibility": enum (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Visibility`), "sharedWith": [ string ] } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Resource name of the template. |
| `displayName` | `string` Required. The name of the template |
| `description` | `string` Optional. Description of the template. The length should not be more than 255 characters |
| `usageInfo` | `string` Optional. Information on how to use the template. This should contain detailed information about usage of the template. |
| `docLink` | `string` Optional. Link to template documentation. |
| `templateBundle` | ``object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#TemplateBundle`)`` Required. Bundle which is part of the templates. The template entities in the bundle would be converted to an actual entity. |
| `components[]` | ``object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Component`)`` Optional. Components being used in the template. This could be used to categorize and filter. |
| `tags[]` | `string` Required. Tags which are used to identify templates. These tags could be for business use case, connectors etc. |
| `categories[]` | ``enum (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Category`)`` Required. Categories associated with the Template. The categories listed below will be utilized for the Template listing. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Auto-generated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Auto-generated Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `author` | `string` Optional. Creator of the template. |
| `usageCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. Number of template usages. |
| `lastUsedTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Time the template was last used. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `visibility` | ``enum (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Visibility`)`` Required. Visibility of the template. |
| `sharedWith[]` | `string` Required. Resource names with which the template is shared for example ProjectNumber/Ord id |

## TemplateBundle

Define the bundle of the template.

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

| Fields ||
|---|---|
| `integrationVersionTemplate` | ``object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#IntegrationVersionTemplate`)`` Required. Main integration templates of the template bundle. |
| `subIntegrationVersionTemplates[]` | ``object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#IntegrationVersionTemplate`)`` Optional. Sub integration templates which would be added along with main integration. |

## IntegrationVersionTemplate

Define the template of IntegrationVersion.

| JSON representation |
|---|
| ``` { "key": string, "integrationVersion": { object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.integrations.versions#IntegrationVersion`) } } ``` |

| Fields ||
|---|---|
| `key` | `string` Required. Unique Key of the IntegrationVersion. |
| `integrationVersion` | ``object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.integrations.versions#IntegrationVersion`)`` Required. Templatized version of integration. |

## Component

Define the components that are present in a template.

| JSON representation |
|---|
| ``` { "type": enum (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Type`), "name": string } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Type`)`` Optional. type of the component. |
| `name` | `string` Optional. name of the component. |

## Type

type of the component.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Component type is unspecified |
| `TRIGGER` | Trigger component |
| `TASK` | Task component |
| `CONNECTOR` | Connector component |

## Category

Category of the template.

| Enums ||
|---|---|
| `CATEGORY_UNSPECIFIED` | Category is unspecified |
| `AI_MACHINE_LEARNING` | AI_MACHINE_LEARNING |
| `BUSINESS_INTELLIGENCE` | BUSINESS_INTELLIGENCE |
| `COLLABORATION` | COLLABORATION |
| `CUSTOMER_SERVICE` | CUSTOMER_SERVICE |
| `DATABASES` | DATAABASES |
| `DEVOPS_IT` | DEVOPS_IT |
| `CONTENT_AND_FILES` | CONTENT_AND_FILES |
| `FINANCE_AND_ACCOUNTING` | FINANCE_AND_ACCOUNTING |
| `HUMAN_RESOURCES` | HUMAN_RESOURCES |
| `OPERATIONS` | OPERATIONS |
| `PRODUCT_PROJECT_MANAGEMENT` | PRODUCT_PROJECT_MANAGEMENT |
| `PRODUCTIVITY` | PRODUCTIVITY |
| `SALES_AND_MARKETING` | SALES_AND_MARKETING |
| `UNIVERSAL_CONNECTORS` | UNIVERSAL_CONNECTORS |
| `UTILITY` | UTILITY |
| `OTHERS` | OTHERS |

## Visibility

Visibility of the template.

| Enums ||
|---|---|
| `VISIBILITY_UNSPECIFIED` | Visibility is unspecified |
| `PRIVATE` | Visibility is private |
| `SHARED` | Visibility is shared |
| `PUBLIC` | Visibility is public |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/create` | Creates a new template |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/delete` | Deletes a template |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/download` | Downloads a template. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/get` | Get a template in the specified project. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/import` | Import the template to an existing integration. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/list` | Lists all templates matching the filter. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/patch` | Updates the template by given id. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/search` | Search templates based on user query and filters. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/share` | Share a template with other clients. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/unshare` | Unshare a template from given clients. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/upload` | Uploads a template. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/use` | Use the template to create integration. |