0

尝试更新与任务关联的标签:

要求:

PUT https://app.asana.com/api/1.0/tasks/286045228787956

请求有效载荷:

{"data":{"tags":[157484377992312,157484408318898,285998759647376]}}

响应:400 正文:

{"errors":[{"message":"tags: Cannot write this property","help":"For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors"}]}

我们不能编辑任务标签吗?还是我传递了错误的参数?

文档没有帮助:https ://asana.com/developers/api-reference/tasks#update

4

1 回答 1

2

为了在任务上编辑标签,您需要使用端点

POST /tasks/<id>/addTag
POST /tasks/<id>/removeTag

您引用的文档的不同部分所述

有效载荷必须是

{"data":{"tag":<your_tag_id>}}
于 2017-03-06T15:00:01.823 回答