送在AtTask PUT请求多个更新 [英] Send multiple updates in AtTask PUT request
问题描述
我想知道是否为AtTask API中有在一个单一的URL请求发布多个更新的方法。
I am wondering if whether in the API for AtTask there is a method for posting multiple updates in a single URL request.
作为一个例子,我需要更新1000条记录的extRefIDs。让我的1000调用的API(在开销方面昂贵的),或者我可以发送一个请求与包含这样的一个JSON或XML有效载荷:
As an example, I need to update the extRefIDs on 1,000 records. Do I make 1,000 calls to the API (expensive in terms of overhead), or can I send a single request with a JSON or XML payload that contains something like this:
{数据
{编号:1234,extRefID:XX}
{编号:1235,extrefID:XY}
}
等?肯定会更少的开销上,如果有此方法两个系统。在此先感谢!
etc? Would certainly be less overhead on both systems if there was a method for this. Thanks in advance!
推荐答案
您可以通过传递一个JSON数组进入更新参数做了相同类型的对象批量更新:
You can do bulk updates on objects of the same type by passing in a single JSON array into the "updates" parameter:
PUT .../api/v4.0/task?updates=[{"ID":"abc123","extRefID":"val1"},{"ID":"def456","extRefID":"val2"}]
希望这有助于。
这篇关于送在AtTask PUT请求多个更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!