Templates: list

列出 GTM 容器工作區的所有 GTM 範本。 立即試用

要求

HTTP 要求

GET https://www.googleapis.com/tagmanager/v2/+parent/templates

參數

參數名稱 說明
路徑參數
parent string GTM Workspace 的 API 相對路徑。 範例: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}
選用的查詢參數
pageToken string 用於擷取下一頁結果的接續權杖。

授權

這項要求需要授權,且至少要有下列其中一個範圍:

範圍
https://www.googleapis.com/auth/tagmanager.edit.containers
https://www.googleapis.com/auth/tagmanager.readonly

詳情請參閱「驗證與授權」網頁。

要求主體

請勿使用這個方法提供請求主體。

回應

如果成功的話,這個方法會傳回回應內文,其結構如下:

{
  "template": [
    accounts.containers.workspaces.templates Resource
  ],
  "nextPageToken": string
}
屬性名稱 說明 附註
template[] list GTM 容器的所有 GTM 自訂範本。
nextPageToken string 用於擷取下一頁結果的接續權杖。

試試看!

使用下方的 APIs Explorer,針對即時資料呼叫這個方法,看看會有什麼結果。