【问题标题】:Update task - change tags更新任务 - 更改标签
【发布时间】:2017-03-05 05:46:54
【问题描述】:

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

请求:

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

【问题讨论】:

    标签: asana asana-api


    【解决方案1】:

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

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

    in a different section of the documentation you referenced所述。

    有效载荷需要是

    {"data":{"tag":<your_tag_id>}}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-01
      • 1970-01-01
      • 2015-11-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多