It gives me the error
{“errors”:[{“message”:“Unrecognized request field gid
. The only allowed keys at the top level are: data, options. Is it possible you did not wrap object properties in a data
object?”,“help”:“For more information on API status codes and how to handle them, read the docs on errors: Errors”}]}
Ive attached the screenshots with the raw input as well as raw output
Result:
Raw Input:
{
"uri": "https://app.asana.com/api/1.0/sections/1203263361450285/addTask",
"method": "POST",
"headers": {
"Authorization": "*sanitized*"
},
"body": {
"gid": "1203263361450285",
"projects": [
{
"gid": "1201520094677789",
"resource_type": "project",
"name": "IT-Service, SIA"
}
],
"resource_type": "task",
"created_at": "2022-10-29T08:13:25.173Z",
"modified_at": "2022-10-29T08:13:26.112Z",
"name": "Testtask",
"notes": "",
"completed": false,
"assignee_status": "inbox",
"resource_subtype": "default_task",
"tags": [],
"workspace": {
"gid": "436595191387853",
"resource_type": "workspace",
"name": "IT-Service, SIA"
},
"num_hearts": 0,
"num_likes": 0,
"permalink_url": "https://app.asana.com/0/1201520094677789/1203263361450285",
"memberships": [
{
"project": {
"gid": "1201520094677789",
"resource_type": "project",
"name": "IT-Service, SIA"
},
"section": {
"gid": "1203244632305855",
"resource_type": "section",
"name": "Incomplete"
}
}
],
"assignee": {
"gid": "1202907352269887",
"resource_type": "user",
"name": "Recep Gencaslan"
},
"hearted": false,
"hearts": [],
"liked": false,
"likes": [],
"followers": [
{
"gid": "1202907352269887",
"resource_type": "user",
"name": "Recep Gencaslan"
}
],
"assignee_section": {
"gid": "1202907369887610",
"resource_type": "section",
"name": "Recently assigned"
},
"custom_fields": [
{
"gid": "1201548785347846",
"resource_type": "custom_field",
"created_by": null,
"resource_subtype": "enum",
"type": "enum",
"name": "Priority",
"enabled": true,
"enum_value": null,
"display_value": null,
"enum_options": [
{
"gid": "1201548785347847",
"resource_type": "enum_option",
"enabled": true,
"name": "High",
"color": "red"
},
{
"gid": "1201548785347848",
"resource_type": "enum_option",
"enabled": true,
"name": "Medium",
"color": "orange"
},
{
"gid": "1201548785347849",
"resource_type": "enum_option",
"enabled": true,
"name": "Low",
"color": "yellow-orange"
}
]
}
]
}
}
Raw Output:
{
"statusCode": 400,
"headers": {
"Connection": "keep-alive",
"pragma": "no-cache",
"X-Frame-Options": "DENY",
"X-XSS-Protection": "1; mode=block",
"X-Content-Type-Options": "nosniff",
"Content-Security-Policy": "report-uri https://app.asana.com/-/csp_report?report_only=false;default-src 'none';frame-src 'none';frame-ancestors 'none'",
"X-Asana-Api-Version": "1.0",
"Asana-Change": "name=new_user_task_lists;info=https://forum.asana.com/t/update-on-our-planned-api-changes-to-user-task-lists-a-k-a-my-tasks/103828,name=external_goal_metrics;info=https://forum.asana.com/t/changes-to-goal-metrics-progress-sources/221257,name=new_project_templates;info=https://forum.asana.com/t/a-new-api-for-project-templates/156432",
"X-Robots-Tag": "none",
"Cache-Control": "no-store",
"Date": "Sat, 29 Oct 2022 08:13:27 GMT",
"Set-Cookie": "TooBusyRedirectCount=0",
"Server": "nginx",
"Content-Length": "329",
"Content-Type": "application/json; charset=UTF-8"
},
"body": {
"errors": [
{
"message": "Unrecognized request field `gid`. The only allowed keys at the top level are: data, options. Is it possible you did not wrap object properties in a `data` object?",
"help": "For more information on API status codes and how to handle them, read the docs on errors: https://developers.asana.com/docs/errors"
}
]
}
}