列出 GTM 容器的所有已启用的内置变量。立即试用。
请求
HTTP 请求
GET https://www.googleapis.com/tagmanager/v2/+parent/built_in_variables
参数
参数名称 | 值 | 说明 |
---|---|---|
路径参数 | ||
parent |
string |
GTM 工作区的 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 |
如需了解详情,请参阅身份验证和授权页面。
请求正文
使用此方法时请勿提供请求正文。
响应
如果成功,此方法将返回采用以下结构的响应正文:
{ "builtInVariable": [ { "path": string, "accountId": string, "containerId": string, "workspaceId": string, "type": string, "name": string } ], "nextPageToken": string }
属性名称 | 值 | 说明 | 备注 |
---|---|---|---|
builtInVariable[] |
list |
GTM 容器的所有 GTM 内置变量。 | |
builtInVariable[].path |
string |
GTM 内置变量的 API 相对路径。 | |
builtInVariable[].accountId |
string |
GTM 账号 ID。 | |
builtInVariable[].containerId |
string |
GTM 容器 ID。 | |
builtInVariable[].workspaceId |
string |
GTM 工作区 ID。 | |
builtInVariable[].type |
string |
内置变量的类型。
可接受的值:
|
|
builtInVariable[].name |
string |
用于指代内置变量的内置变量名称。 | |
nextPageToken |
string |
用于获取下一页结果的延续令牌。 |
试试看!
使用下面的 API Explorer 对实际数据调用此方法,然后查看响应。