Method: workspaces.create_version

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:

JSON representation
{
  "containerVersion": {
    object (ContainerVersion)
  },
  "syncStatus": {
    object (SyncStatus)
  },
  "compilerError": boolean,
  "newWorkspacePath": string
}
Fields
containerVersion

object (ContainerVersion)

The container version created.

syncStatus

object (SyncStatus)

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.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/tagmanager.edit.containerversions

For more information, see the OAuth 2.0 Overview.

VersionOptions

Options for new container versions.

JSON representation
{
  "name": string,
  "notes": string
}
Fields
name

string

The name of the container version to be created.

notes

string

The notes of the container version to be created.