创建 GTM 工作区提案。立即试用。
请求
HTTP 请求
POST https://www.googleapis.com/tagmanager/v2/+parent/proposal
参数
参数名称 | 值 | 说明 |
---|---|---|
路径参数 | ||
parent |
string |
GTM 工作区的 API 相对路径。示例:accounts/{aid}/containers/{cid}/workspace/{wid} |
请求正文
在请求正文中,请按以下结构提供数据:
{ "reviewers": [ { "type": string, "gaiaId": long } ], "initialComment": { "content": string } }
属性名称 | 值 | 说明 | 备注 |
---|---|---|---|
reviewers[] |
list |
要查看工作区提案的用户列表。 | |
reviewers[].type |
string |
用户类型用于区分用户和 Google 跟踪代码管理器系统。
可接受的值:
|
|
reviewers[].gaiaId |
long |
与用户关联的 GAIA ID,Google 跟踪代码管理器系统无此 ID。 | |
initialComment |
nested object |
要与工作区提案关联的初始评论(如果有的话)。 | |
initialComment.content |
string |
审核者或作者的评论内容。 |
响应
如果成功,此方法将返回采用以下结构的响应正文:
{ "path": string, "status": string, "authors": [ { "type": string, "gaiaId": long } ], "reviewers": [ { "type": string, "gaiaId": long } ], "history": [ { "type": string, "comment": { "content": string }, "statusChange": { "oldStatus": string, "newStatus": string }, "createdBy": { "type": string, "gaiaId": long }, "createdTimestamp": { "seconds": long, "nanos": integer } } ], "fingerprint": string }
属性名称 | 值 | 说明 | 备注 |
---|---|---|---|
path |
string |
GTM 工作区提案的相对路径。 | |
status |
string |
工作区提案在接受审核时的状态。
可接受的值:
|
|
authors[] |
list |
工作区提案的作者列表。 | |
authors[].type |
string |
用户类型用于区分用户和 Google 跟踪代码管理器系统。
可接受的值:
|
|
authors[].gaiaId |
long |
与用户关联的 GAIA ID,Google 跟踪代码管理器系统无此 ID。 | |
reviewers[] |
list |
工作区提案的审核者列表。 | |
reviewers[].type |
string |
用户类型用于区分用户和 Google 跟踪代码管理器系统。
可接受的值:
|
|
reviewers[].gaiaId |
long |
与用户关联的 GAIA ID,Google 跟踪代码管理器系统无此 ID。 | |
history[] |
list |
记录评论和状态更改的历史记录。 | |
history[].type |
string |
历史记录类型用于区分评论和状态更改。
可接受的值:
|
|
history[].comment |
nested object |
用户评论或审核者评论。 | |
history[].comment.content |
string |
审核者或作者的评论内容。 | |
history[].statusChange |
nested object |
提案状态更改。 | |
history[].statusChange.oldStatus |
string |
状态更改前的旧提案状态。
可接受的值:
|
|
history[].statusChange.newStatus |
string |
状态更改后的新提案状态。
可接受的值:
|
|
history[].createdBy |
nested object |
历史记录中相应更改的负责方。 | |
history[].createdBy.type |
string |
用户类型用于区分用户和 Google 跟踪代码管理器系统。
可接受的值:
|
|
history[].createdBy.gaiaId |
long |
与用户关联的 GAIA ID,Google 跟踪代码管理器系统无此 ID。 | |
history[].createdTimestamp |
nested object |
此历史记录事件添加到工作区提案的时间。 | |
history[].createdTimestamp.seconds |
long |
表示世界协调时间 (UTC) 的秒数(从 Unix 时间 1970-01-01T00:00:00Z 开始算起)。必须介于 0001-01-01T00:00:00Z 到 9999-12-31T23:59:59Z 之间(含 0001-01-01T00:00:00Z)。 | |
history[].createdTimestamp.nanos |
integer |
秒的非负分数(纳秒精度)。对于含小数部分的负秒数,仍必须包含按时间递升的非负纳秒值。必须介于 0 到 999,999,999 之间(含边界值)。 | |
fingerprint |
string |
GTM 工作区提案的指纹,以存储时计算的值为准。每当修改提案时,都会重新计算此值。 |
试试看!
请使用下面的 API Explorer 对实时数据调用此方法并查看响应。