本 API 參考資料是依照資源類型編排。各個資源類型都具有一或多種資料表示法,以及一或多種方法。
資源類型
- 帳戶
- 容器版本
- 容器
- 環境
- Environments.reAuthorization_environments
- 資料夾
- Folders.entities
- Folders.move_folders
- 權限
- 標記
- 觸發條件
- 變數
帳戶
如要進一步瞭解 Account 資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
get |
GET /accounts/accountId
|
取得 GTM 帳戶。 |
list |
GET /accounts
|
列出使用者可存取的所有 GTM 帳戶。 |
更新 |
PUT /accounts/accountId
|
更新 GTM 帳戶。 |
容器版本
如需容器版本資源的詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
create |
POST /accounts/accountId/containers/containerId/versions
|
建立容器版本。 |
刪除 |
DELETE /accounts/accountId/containers/containerId/versions/containerVersionId
|
刪除容器版本。 |
get |
GET /accounts/accountId/containers/containerId/versions/containerVersionId
|
取得容器版本。 |
list |
GET /accounts/accountId/containers/containerId/versions
|
列出 GTM 容器的所有容器版本。 |
publish |
POST /accounts/accountId/containers/containerId/versions/containerVersionId/publish
|
發布容器版本。 |
restore |
POST /accounts/accountId/containers/containerId/versions/containerVersionId/restore
|
還原容器版本。這項操作會覆寫容器目前的設定 (包括容器的變數、觸發條件和代碼)。這項作業不會對提供的版本 (即已發布的版本) 產生任何影響。 |
undelete |
POST /accounts/accountId/containers/containerId/versions/containerVersionId/undelete
|
取消刪除容器版本。 |
更新 |
PUT /accounts/accountId/containers/containerId/versions/containerVersionId
|
更新容器版本。 |
容器
如要進一步瞭解容器資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
create |
POST /accounts/accountId/containers
|
建立容器。 |
刪除 |
DELETE /accounts/accountId/containers/containerId
|
刪除容器。 |
get |
GET /accounts/accountId/containers/containerId
|
取得容器。 |
list |
GET /accounts/accountId/containers
|
列出屬於特定 GTM 帳戶的所有容器。 |
更新 |
PUT /accounts/accountId/containers/containerId
|
更新容器。 |
環境
如需環境資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
create |
POST /accounts/accountId/containers/containerId/environments
|
建立 GTM 環境。 |
刪除 |
DELETE /accounts/accountId/containers/containerId/environments/environmentId
|
刪除 GTM 環境。 |
get |
GET /accounts/accountId/containers/containerId/environments/environmentId
|
取得 GTM 環境。 |
list |
GET /accounts/accountId/containers/containerId/environments
|
列出 GTM 容器的所有 GTM 環境。 |
更新 |
PUT /accounts/accountId/containers/containerId/environments/environmentId
|
更新 GTM 環境。 |
Environments.reauthorize_environments
如要進一步瞭解 Environments.reAuthorization_environments 資源的詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
更新 |
PUT /accounts/accountId/containers/containerId/reauthorize_environments/environmentId
|
重新產生 GTM 環境的授權碼。 |
資料夾
如需資料夾資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
create |
POST /accounts/accountId/containers/containerId/folders
|
建立 GTM 資料夾。 |
刪除 |
DELETE /accounts/accountId/containers/containerId/folders/folderId
|
刪除 GTM 資料夾。 |
get |
GET /accounts/accountId/containers/containerId/folders/folderId
|
取得 GTM 資料夾。 |
list |
GET /accounts/accountId/containers/containerId/folders
|
列出容器的所有 GTM 資料夾。 |
更新 |
PUT /accounts/accountId/containers/containerId/folders/folderId
|
更新 GTM 資料夾。 |
Folders.entities
如需 Folders.entities 資源詳細資料,請參閱資源表示法頁面。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
list |
GET /accounts/accountId/containers/containerId/folders/folderId/entities
|
列出 GTM 資料夾中的所有實體。 |
Folders.move_folders
如要進一步瞭解 Folders.move_folders 資源,請參閱資源表示法頁面。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
更新 |
PUT /accounts/accountId/containers/containerId/move_folders/folderId
|
將實體移至 GTM 資料夾。 |
權限
如需權限資源詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
create |
POST /accounts/accountId/permissions
|
建立使用者帳戶和容器權限。 |
刪除 |
DELETE /accounts/accountId/permissions/permissionId
|
從帳戶中移除使用者,撤銷對方對該帳戶及其所有容器的存取權。 |
get |
GET /accounts/accountId/permissions/permissionId
|
取得使用者的帳戶和容器權限。 |
list |
GET /accounts/accountId/permissions
|
列出可存取該帳戶的所有使用者,以及授予各個帳戶的帳戶和容器權限。 |
更新 |
PUT /accounts/accountId/permissions/permissionId
|
更新使用者的帳戶和容器權限。 |
標記
如要進一步瞭解標記資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
create |
POST /accounts/accountId/containers/containerId/tags
|
建立 GTM 代碼。 |
刪除 |
DELETE /accounts/accountId/containers/containerId/tags/tagId
|
刪除 GTM 代碼。 |
get |
GET /accounts/accountId/containers/containerId/tags/tagId
|
取得 GTM 代碼。 |
list |
GET /accounts/accountId/containers/containerId/tags
|
列出容器的所有 GTM 代碼。 |
更新 |
PUT /accounts/accountId/containers/containerId/tags/tagId
|
更新 GTM 代碼。 |
觸發條件
如需觸發條件資源的詳細資料,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
create |
POST /accounts/accountId/containers/containerId/triggers
|
建立 GTM 觸發條件。 |
刪除 |
DELETE /accounts/accountId/containers/containerId/triggers/triggerId
|
刪除 Google 代碼管理工具觸發條件。 |
get |
GET /accounts/accountId/containers/containerId/triggers/triggerId
|
取得 GTM 觸發條件。 |
list |
GET /accounts/accountId/containers/containerId/triggers
|
列出容器的所有 GTM 觸發條件。 |
更新 |
PUT /accounts/accountId/containers/containerId/triggers/triggerId
|
更新 GTM 觸發條件。 |
變數
如要進一步瞭解 Variables 資源,請參閱資源表示法網頁。
方法 | HTTP 要求 | 說明 |
---|---|---|
相對於 https://www.googleapis.com/tagmanager/v1 的 URI (除非另有註明) | ||
create |
POST /accounts/accountId/containers/containerId/variables
|
建立 GTM 變數。 |
刪除 |
DELETE /accounts/accountId/containers/containerId/variables/variableId
|
刪除 GTM 變數。 |
get |
GET /accounts/accountId/containers/containerId/variables/variableId
|
取得 GTM 變數。 |
list |
GET /accounts/accountId/containers/containerId/variables
|
列出容器的所有 GTM 變數。 |
更新 |
PUT /accounts/accountId/containers/containerId/variables/variableId
|
更新 GTM 變數。 |