Method: workspaces.bulk_update

Full name: accounts.containers.workspaces.bulk_update

Applies multiple entity changes to a workspace in one call. When creating new entities, their entity IDs must be unique and in correct format. That is, they must start with "new_" and followed by number, e.g. "new_1", "new_2". Example body snippet to create myNewTag under myNewFolder is:

"changes": [
  {
    "folder": {
      "folderId": "new_1",
      "name": "myNewFolder",
      ...
    },
    "changeStatus": "added"
  },
  {
    "tag": {
      "tagId": "new_2",
      "name": "myNewTag",
      "parentFolderId": "new_1",
      ...
    },
    "changeStatus": "added"
  }
]

HTTP request

POST https://tagmanager.googleapis.com/tagmanager/v2/{path}/bulk_update

Path parameters

Parameters
path

string

GTM Workspace's API relative path. It takes the form accounts/{account}/containers/{container}/workspaces/{workspace}.

Request body

The request body contains an instance of ProposedChange.

Response body

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

JSON representation
{
  "changes": [
    {
      object (Entity)
    }
  ]
}
Fields
changes[]

object (Entity)

The entities that were added or updated during the bulk-update. Does not include entities that were deleted or updated by the system.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

ProposedChange

JSON representation
{
  "changes": [
    {
      object (Entity)
    }
  ]
}
Fields
changes[]

object (Entity)

The list of workspace changes to be applied.