Full name: accounts.containers.workspaces.create_version
Creates a Container Version from the entities present in the workspace, deletes the workspace, and sets the base container version to the newly created version.
HTTP request
POST https://tagmanager.googleapis.com/tagmanager/v2/{path}:create_version
Path parameters
Parameters
path
string
GTM Workspace's API relative path.
Request body
The request body contains an instance of VersionOptions.
Response body
Create container versions response.
If successful, the response body contains data with the following structure:
Whether version creation failed when syncing the workspace to the latest container version.
compilerError
boolean
Compiler errors or not.
newWorkspacePath
string
Auto generated workspace path created as a result of version creation. This field should only be populated if the created version was not a quick preview.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-06 UTC."],[],[],null,["# Method: workspaces.create_version\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.CreateContainerVersionResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [VersionOptions](#VersionOptions)\n - [JSON representation](#VersionOptions.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\n**Full name**: accounts.containers.workspaces.create_version\n\nCreates a Container Version from the entities present in the workspace, deletes the workspace, and sets the base container version to the newly created version.\n\n### HTTP request\n\n`POST https://tagmanager.googleapis.com/tagmanager/v2/{path}:create_version`\n\n### Path parameters\n\n| Parameters ||\n|--------|---------------------------------------------|\n| `path` | `string` GTM Workspace's API relative path. |\n\n### Request body\n\nThe request body contains an instance of [VersionOptions](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.workspaces/create_version#VersionOptions).\n\n### Response body\n\nCreate container versions response.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"containerVersion\": { object (/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#ContainerVersion) }, \"syncStatus\": { object (/tag-platform/tag-manager/api/reference/rest/v2/SyncStatus) }, \"compilerError\": boolean, \"newWorkspacePath\": string } ``` |\n\n| Fields ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `containerVersion` | `object (`[ContainerVersion](/tag-platform/tag-manager/api/reference/rest/v2/accounts.containers.versions#ContainerVersion)`)` The container version created. |\n| `syncStatus` | `object (`[SyncStatus](/tag-platform/tag-manager/api/reference/rest/v2/SyncStatus)`)` Whether version creation failed when syncing the workspace to the latest container version. |\n| `compilerError` | `boolean` Compiler errors or not. |\n| `newWorkspacePath` | `string` Auto generated workspace path created as a result of version creation. This field should only be populated if the created version was not a quick preview. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/tagmanager.edit.containerversions`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2).\n\nVersionOptions\n--------------\n\nOptions for new container versions.\n\n| JSON representation |\n|---------------------------------------------|\n| ``` { \"name\": string, \"notes\": string } ``` |\n\n| Fields ||\n|---------|------------------------------------------------------------|\n| `name` | `string` The name of the container version to be created. |\n| `notes` | `string` The notes of the container version to be created. |"]]