Method: customers.batchJobs.addOperations

向批量作业添加操作。

抛出的错误列表:AuthenticationError AuthorizationError BatchJobError HeaderError InternalError QuotaError RequestError ResourceCountLimitExceededError

HTTP 请求

POST https://googleads.googleapis.com/v14/{resourceName=customers/*/batchJobs/*}:addOperations

网址采用 gRPC 转码语法。

路径参数

参数
resourceName

string

必需。批量作业的资源名称。

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{
  "sequenceToken": string,
  "mutateOperations": [
    {
      object (MutateOperation)
    }
  ]
}
字段
sequenceToken

string

用于强制执行排序的令牌。

批量作业的第一个 batchJobs.addOperations 请求不应设置 sequenceToken。后续请求必须将 orderToken 设置为在上一个 batchJobs.addOperations 响应中收到的 nextSequenceToken 的值。

mutateOperations[]

object (MutateOperation)

必需。要添加的 mutate 的列表。

操作可以使用负整数作为临时 ID,用于表示在此批量作业中创建的实体之间的依赖关系。例如,ID = 1234 的客户可以在同一广告系列中制作广告系列和广告组,方法是在第一次操作中创建一个广告系列,将资源名称明确设置为“customers/1234/campaigns/-1”,在第二项操作中创建一个广告组,广告系列字段也设置为“customers/1234/campaigns/-1”。

响应正文

BatchJobService.AddBatchJobOperations 的响应消息。

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "totalOperations": string,
  "nextSequenceToken": string
}
字段
totalOperations

string (int64 format)

到目前为止,为此批量作业添加的操作总数。

nextSequenceToken

string

需要添加更多操作时,再次调用 batchJobs.addOperations 时要使用的序列令牌。下一个 batchJobs.addOperations 请求必须将 orderToken 字段设置为此字段的值。

授权范围

需要以下 OAuth 作用域:

  • https://www.googleapis.com/auth/adwords

有关详情,请参阅 OAuth 2.0 概览