Send multiple updates in AtTask PUT request

2019-05-18 20:17发布

问题:

I am wondering if whether in the API for AtTask there is a method for posting multiple updates in a single URL request.

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:

{data {id:1234,extRefID:xx} {id:1235,extrefID:xy} }

etc? Would certainly be less overhead on both systems if there was a method for this. Thanks in advance!

回答1:

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"}]

Hope this help.



标签: api rest attask