I’m trying to update a asana task from ServiceNow Rest API but receiving the following error.
{“errors”:[{“message”:“task: Not a Long: task_gid”,“help”:“For more information on API status codes and how to handle them, read the docs on errors: Errors”}]}
Welcome to the forum! Please see documentation for this endpoint here. You need to pass the task_gid in the URL and not the content body. That error is telling you that you’re passing the literal string task_gid instead of passing the actual task_gid itself as a string (e.g. "1122334455").
@Srujan_Chilumula - Assuming you have the task open on your screen (probably inside of a project), that’s correct. In that URL, the first long gid is for the project and the second is for the task.
I successfully updated the task in Asana from ServiceNow. Now, I am attempting to update the task comments using the following content:
{
“data”: {
“notes”: “Mittens likes the stuff from Humboldt.”
}
}
However, instead of updating the comments, it is updating the task description. Can you please let me know what the query parameter is for comments in Asana?
@Srujan_Chilumula - this is the documentation for comments (create and update are slightly different but both documented). Generally speaking, the dev docs are a really good place to check first (you can search them for keywords like “comment”) since you can also test your calls in the web-based explorer before building your calls in your app.