AtTask API在自定义复选框字段中更新多个值

时间:2014-03-20 17:14:31

标签: attask

我有一个名为'标签'的自定义字段。当我得到一个任务时,AtTask如何回应:

GET /attask/api/v3.0/task/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?fields=DE:Labels

响应

{
  data: {
    ID: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    name: "Task Name",
    objCode: "TASK",
    DE:Labels: [
      "a",
      "b",
      "c"
    ]
  }
}

当我尝试使用一组新值更新字段时,出现此错误:

PUT /attask/api/v3.0/task/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?DE:Labels=["a","b","c"]

响应
键入:com.attask.common.InvalidParameterException
消息:无效参数:标签值" [" a"," b"," c"]"

我也试过这些格式:

[""" B"" C"]
A,B,C
[A,B,C]
""" B"" C"

提前感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

我找到了答案。您需要在此方案中使用JSON Edits。

http://developers.attask.com/api-docs/#JSONEdits

PUT /attask/api/v3.0/task/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?updates={DE:Labels=["a","b","c"]}