We are trying to get the tasks from Asana using the Asana API to create a customized dashboard. But we couldn't get archived tasks using the API.
Is there anyway to get all tasks including the archived tasks using the API?
If this feature doesn't exist will it be added in the upcoming releases?
Thanks in advance
There's actually a flag, include_archived that you can set to true, which will cause a query for tasks to (you guessed it!) include the archived tasks as well. See https://asana.com/developers/api-reference/tasks for more details (esp. the "Querying for Tasks" section).
Hope that helps!
Related
I want to get all tasks my user created.
I tried to use https://graph.microsoft.com/v1.0/drive/root/createdByUser/planner/tasks endpoint in the Graph Explorer, but I got error 500 (internal server error).
The official documentation is here: https://learn.microsoft.com/en-us/graph/api/planneruser-list-tasks?view=graph-rest-1.0&tabs=http
Do you have any suggestion how I can get all the planner tasks I created?
Tasks created by a user is not a supported query. People can lose access to tasks that they have created (e.g. if they are removed from groups). The closest operation you can do is to loop over the plans in the groups you are a member of, read the plans in those tasks and see which ones were created by your user. The API linked in the question will return the tasks assigned to you.
I'm interested in using Graph API in order to manage tasks within MS To do. I've already found documentation for creating a new task.
However, I didn't find anything about the following during a new task creation or task update:
Is it possible to set subtasks on a task?
Is it possible to set a category on a task?
Is it possible to reassign a task?
Maybe someone has information about it.
As of now there is no way you can create sub-task with Microsoft
Graph. There is a feature request already present
here,
please upvote it so that product team may consider it for
development in future.
For category as well we cannot get or set the data as of now. For
this as well there is a feature request
here.
Please upvote it.
For the assignment as well there is a uservoice
here.
Please upvote it so that it may be implemented in future.
I am trying to use the Asana API to get all tasks within a project, as well as whether they have been completed. This seems to require the use of the opt_expand parameter, but I am having no luck with the following URL (and combinations of it): https://app.asana.com/api/1.0/projects/XXXX/tasks?limit=10&fields=completed&opt_expand=completed. Is this possible with the Asana API currently?
You need to use the opt_fields parameter in your GET request. Asana does not support generalized queries like completed=true. However, you can query for all tasks for a particular project and then filter the tasks by their completed_at value. The completed_at field will return a read-only time (e.g.'2012-02-22T02:06:58.147Z') of when the task was completed or null if the task is incomplete.
To return all tasks related to a project, including if they are complete, use this GET request: /projects/XXXX/tasks?opt_fields=name,completed_at.
For your reference, you can specify the options you want returned by using the parameters outlined in the Asana Input/Output Option docs. Also make sure to read the Asana Tasks docs to see which fields are available for the task resource.
when you query /projects I get every project in the organization(a-lot) ... is there anyway to just get projects that I am interested in (ie task assigned to me, mention of me, or one that I have flaged as following?)
I have also tried
users/me/projects
projects?followers=me
That's a really interesting idea. We don't currently have a way of doing that - even in the product! - in part because everyone's definition of "interesting to me" is a little different. For instance, there's no global way to look up, for a user, all the comments they're mentioned in - mentioning adds a user as a follower to the task, sure, but they might be removed from the followers list subsequently. Should projects with tasks that I hearted be included? What about projects with tasks that have comments that I hearted? Projects with tasks that I'm following, sure - but what if the last time I followed a task in that project was over a year ago, and the task I followed is long since complete? Since tasks can be in multiple projects, does it make sense to include a project that I may have never even seen, but includes a task that's also in a project I work on, and so I've touched it? It's a tricky question to get right for everyone, to be sure.
In the meantime, you can get tasks that are assigned to you in a workspace (GET /tasks?workspace=[id]&assignee=me) and then crawl all the tasks to find the projects they're in (I know, not terribly elegant).
We currently don't expose projects/tasks you're following or projects you've favorited (starred) via the API. And as far as I know there's no way to query stories/tasks you're mentioned in via the API or the app.
Do you plan to add possibility to retrieve (via API) all tasks from project including those which are archived?
(I work at Asana)
That would be a useful feature and we are already planning on adding it. However, I can't comment as to when it will be possible.
Until the API officially supports this, you can always query /tasks?completed_since=now to get only incomplete tasks, then query /tasks, and filter for tasks that only appear in the second list.
Archived tasks can be accessed by including the parameter ?include_archived=true in your request for querying tasks by project.
Task section in Asana documentation
I am trying to do this exact same thing as well. We are using a project to track line down events on our manufacturing floor. I found this post helpful and you can append “?include_archived=true” to your query but I found out that you can also do a reverse lookup on tasks by their tag. This will also show achieved tasks as well.