'部分的正确类型是什么? tasks / task_id / addProject中的参数?

时间:2017-02-02 09:34:39

标签: asana asana-api

我有以下任务:

$ curl "https://app.asana.com/api/1.0/tasks/259676837324664" | jq
{
  "data": {
    "id": 259676837324664,
    "assignee": {
      "id": 202581546604537,
      "name": "Leonid"
    },
    "assignee_status": "inbox",
    "completed": false,
    "completed_at": null,
    "created_at": "2017-02-01T13:53:31.556Z",
    "custom_fields": [],
    "due_at": null,
    "due_on": "2017-02-02",
    "followers": [
      {
        "id": 190628515114637,
        "name": "Remco"
      },
      {
        "id": 202581546604537,
        "name": "Leonid"
      }
    ],
    "hearted": false,
    "hearts": [],
    "memberships": [
      {
        "project": {
          "id": 256988229703133,
          "name": "MS2: Private ICO"
        },
        "section": {
          "id": 256988229703195,
          "name": "Week 04"
        }
      }
    ],
    "modified_at": "2017-02-02T09:05:16.906Z",
    "name": "Test Web3 detection/operation in Parity/Metamask/Mist",
    "notes": "",
    "num_hearts": 0,
    "parent": null,
    "projects": [
      {
        "id": 256988229703133,
        "name": "MS2: Private ICO"
      }
    ],
    "tags": [],
    "workspace": {
      "id": 163713730991759,
      "name": "Neufund"
    }
  }
}

我想将其移至第04周'

部分的底部
$ curl -X POST "https://app.asana.com/api/1.0/tasks/259676837324664/addProject"\
    -d "section=256988229703195&insertBefore=null&project=256988229703133" | jq
{
  "errors": [
    {
      "message": "section: Not the correct type",
      "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"
    }
  ]
}

我使用section.id并将其用作section参数。这就是我理解API文档的方式。该错误表明这是不正确的。

我做错了什么?

(由于显而易见的原因,遗漏了身份验证令牌标题。我可以使用相同的帐户将任务移到Web界面的底部,因此授权不是问题)

1 个答案:

答案 0 :(得分:2)

处理董事会项目的功能目前落后于旗帜。我为您的组织启用了标记,如果您仍然遇到问题,请告诉我们。

请注意,您无法在section端点上同时指定insert_beforePOST /tasks/:task/addProject参数。