tasks/task_id/addProject 中 'section' 参数的正确类型是什么?
What is the correct type of the 'section' parameter in tasks/task_id/addProject?
我有以下任务:
$ 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"
}
}
}
我想把它移到第 'Week 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 文档的理解。错误提示这是不正确的。
我做错了什么?
(身份验证令牌 header 由于显而易见的原因被遗漏了。我可以使用相同的帐户将任务移动到 Web 界面的底部,因此授权不是问题)
处理看板项目的功能目前处于一个标志之后。我已经为你的组织启用了标记,所以如果你仍然遇到问题,请告诉我们。
请注意,您不能在 POST /tasks/:task/addProject
端点上同时指定 section
和 insert_before
参数。
我有以下任务:
$ 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"
}
}
}
我想把它移到第 'Week 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 文档的理解。错误提示这是不正确的。
我做错了什么?
(身份验证令牌 header 由于显而易见的原因被遗漏了。我可以使用相同的帐户将任务移动到 Web 界面的底部,因此授权不是问题)
处理看板项目的功能目前处于一个标志之后。我已经为你的组织启用了标记,所以如果你仍然遇到问题,请告诉我们。
请注意,您不能在 POST /tasks/:task/addProject
端点上同时指定 section
和 insert_before
参数。