# REST Resource: accounts.containers.versions

- [Resource: ContainerVersion](https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#ContainerVersion)
  - [JSON representation](https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#ContainerVersion.SCHEMA_REPRESENTATION)
- [BuiltInVariable](https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#BuiltInVariable)
  - [JSON representation](https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#BuiltInVariable.SCHEMA_REPRESENTATION)
- [BuiltInVariableType](https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#BuiltInVariableType)
- [Methods](https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#METHODS_SUMMARY)

## Resource: ContainerVersion

Represents a Google Tag Manager Container Version.

| JSON representation |
|---|
| ``` { "path": string, "accountId": string, "containerId": string, "containerVersionId": string, "name": string, "deleted": boolean, "description": string, "container": { object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers#Container`) }, "tag": [ { object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.tags#Tag`) } ], "trigger": [ { object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.triggers#Trigger`) } ], "variable": [ { object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.variables#Variable`) } ], "folder": [ { object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.folders#Folder`) } ], "builtInVariable": [ { object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#BuiltInVariable`) } ], "fingerprint": string, "tagManagerUrl": string, "zone": [ { object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.zones#Zone`) } ], "customTemplate": [ { object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.templates#CustomTemplate`) } ], "client": [ { object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.clients#Client`) } ], "gtagConfig": [ { object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.gtag_config#GtagConfig`) } ], "transformation": [ { object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.transformations#Transformation`) } ] } ``` |

| Fields ||
|---|---|
| `path` | `string` GTM Container Version's API relative path. |
| `accountId` | `string` GTM Account ID. |
| `containerId` | `string` GTM Container ID. |
| `containerVersionId` | `string` The Container Version ID uniquely identifies the GTM Container Version. |
| `name` | `string` Container version display name. |
| `deleted` | `boolean` A value of true indicates this container version has been deleted. |
| `description` | `string` Container version description. |
| `container` | ``object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers#Container`)`` The container that this version was taken from. |
| `tag[]` | ``object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.tags#Tag`)`` The tags in the container that this version was taken from. |
| `trigger[]` | ``object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.triggers#Trigger`)`` The triggers in the container that this version was taken from. |
| `variable[]` | ``object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.variables#Variable`)`` The variables in the container that this version was taken from. |
| `folder[]` | ``object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.folders#Folder`)`` The folders in the container that this version was taken from. |
| `builtInVariable[]` | ``object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#BuiltInVariable`)`` The built-in variables in the container that this version was taken from. |
| `fingerprint` | `string` The fingerprint of the GTM Container Version as computed at storage time. This value is recomputed whenever the container version is modified. |
| `tagManagerUrl` | `string` Auto generated link to the tag manager UI |
| `zone[]` | ``object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.zones#Zone`)`` The zones in the container that this version was taken from. |
| `customTemplate[]` | ``object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.templates#CustomTemplate`)`` The custom templates in the container that this version was taken from. |
| `client[]` | ``object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.clients#Client`)`` The clients in the container that this version was taken from. |
| `gtagConfig[]` | ``object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.gtag_config#GtagConfig`)`` The Google tag configs in the container that this version was taken from. |
| `transformation[]` | ``object (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces.transformations#Transformation`)`` The transformations in the container that this version was taken from. |

## BuiltInVariable

Built-in variables are a special category of variables that are pre-created and non-customizable. They provide common functionality like accessing properties of the gtm data layer, monitoring clicks, or accessing elements of a page URL.

| JSON representation |
|---|
| ``` { "path": string, "accountId": string, "containerId": string, "workspaceId": string, "type": enum (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#BuiltInVariableType`), "name": string } ``` |

| Fields ||
|---|---|
| `path` | `string` GTM BuiltInVariable's API relative path. |
| `accountId` | `string` GTM Account ID. |
| `containerId` | `string` GTM Container ID. |
| `workspaceId` | `string` GTM Workspace ID. |
| `type` | ``enum (`https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#BuiltInVariableType`)`` Type of built-in variable. |
| `name` | `string` Name of the built-in variable to be used to refer to the built-in variable. |

## BuiltInVariableType

Note that BuiltInVariableType must be binary compatible with container_tag.BuiltInType.BuiltInMacroType.

| Enums ||
|---|---|
| `builtInVariableTypeUnspecified` |   |
| `pageUrl` |   |
| `pageHostname` |   |
| `pagePath` |   |
| `referrer` |   |
| `event` | For web or mobile. |
| `clickElement` |   |
| `clickClasses` |   |
| `clickId` |   |
| `clickTarget` |   |
| `clickUrl` |   |
| `clickText` |   |
| `firstPartyServingUrl` |   |
| `formElement` |   |
| `formClasses` |   |
| `formId` |   |
| `formTarget` |   |
| `formUrl` |   |
| `formText` |   |
| `errorMessage` |   |
| `errorUrl` |   |
| `errorLine` |   |
| `newHistoryUrl` |   |
| `oldHistoryUrl` |   |
| `newHistoryFragment` |   |
| `oldHistoryFragment` |   |
| `newHistoryState` |   |
| `oldHistoryState` |   |
| `historySource` |   |
| `containerVersion` | For web or mobile. |
| `debugMode` |   |
| `randomNumber` | For web or mobile. |
| `containerId` | For web or mobile. |
| `appId` |   |
| `appName` |   |
| `appVersionCode` |   |
| `appVersionName` |   |
| `language` |   |
| `osVersion` |   |
| `platform` |   |
| `sdkVersion` |   |
| `deviceName` |   |
| `resolution` |   |
| `advertiserId` |   |
| `advertisingTrackingEnabled` |   |
| `htmlId` |   |
| `environmentName` |   |
| `ampBrowserLanguage` |   |
| `ampCanonicalPath` |   |
| `ampCanonicalUrl` |   |
| `ampCanonicalHost` |   |
| `ampReferrer` |   |
| `ampTitle` |   |
| `ampClientId` |   |
| `ampClientTimezone` |   |
| `ampClientTimestamp` |   |
| `ampClientScreenWidth` |   |
| `ampClientScreenHeight` |   |
| `ampClientScrollX` |   |
| `ampClientScrollY` |   |
| `ampClientMaxScrollX` |   |
| `ampClientMaxScrollY` |   |
| `ampTotalEngagedTime` |   |
| `ampPageViewId` |   |
| `ampPageLoadTime` |   |
| `ampPageDownloadTime` |   |
| `ampGtmEvent` |   |
| `eventName` |   |
| `firebaseEventParameterCampaign` |   |
| `firebaseEventParameterCampaignAclid` |   |
| `firebaseEventParameterCampaignAnid` |   |
| `firebaseEventParameterCampaignClickTimestamp` |   |
| `firebaseEventParameterCampaignContent` |   |
| `firebaseEventParameterCampaignCp1` |   |
| `firebaseEventParameterCampaignGclid` |   |
| `firebaseEventParameterCampaignSource` |   |
| `firebaseEventParameterCampaignTerm` |   |
| `firebaseEventParameterCurrency` |   |
| `firebaseEventParameterDynamicLinkAcceptTime` |   |
| `firebaseEventParameterDynamicLinkLinkid` |   |
| `firebaseEventParameterNotificationMessageDeviceTime` |   |
| `firebaseEventParameterNotificationMessageId` |   |
| `firebaseEventParameterNotificationMessageName` |   |
| `firebaseEventParameterNotificationMessageTime` |   |
| `firebaseEventParameterNotificationTopic` |   |
| `firebaseEventParameterPreviousAppVersion` |   |
| `firebaseEventParameterPreviousOsVersion` |   |
| `firebaseEventParameterPrice` |   |
| `firebaseEventParameterProductId` |   |
| `firebaseEventParameterQuantity` |   |
| `firebaseEventParameterValue` |   |
| `videoProvider` |   |
| `videoUrl` |   |
| `videoTitle` |   |
| `videoDuration` |   |
| `videoPercent` |   |
| `videoVisible` |   |
| `videoStatus` |   |
| `videoCurrentTime` |   |
| `scrollDepthThreshold` |   |
| `scrollDepthUnits` |   |
| `scrollDepthDirection` |   |
| `elementVisibilityRatio` |   |
| `elementVisibilityTime` |   |
| `elementVisibilityFirstTime` |   |
| `elementVisibilityRecentTime` |   |
| `requestPath` |   |
| `requestMethod` |   |
| `clientName` |   |
| `queryString` |   |
| `serverPageLocationUrl` |   |
| `serverPageLocationPath` |   |
| `serverPageLocationHostname` |   |
| `visitorRegion` |   |
| `analyticsClientId` |   |
| `analyticsSessionId` |   |
| `analyticsSessionNumber` |   |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions/delete` | Deletes a Container Version. |
| ### `https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions/get` | Gets a Container Version. |
| ### `https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions/live` | Gets the live (i.e. |
| ### `https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions/publish` | Publishes a Container Version. |
| ### `https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions/set_latest` | Sets the latest version used for synchronization of workspaces when detecting conflicts and errors. |
| ### `https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions/undelete` | Undeletes a Container Version. |
| ### `https://developers.google.com/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions/update` | Updates a Container Version. |