How to get all tasks assigned to me using the API

how do I get all task assigned to me using the APIs

1 Like

Hi @Terry_Rieckhoff,

You can query all your tasks through our API with a request similar to the following:

curl --header “Authorization: Bearer $ASANA_PERSONAL_ACCESS_TOKEN” “https://app.asana.com/api/1.0/tasks?assignee=me&completed_since=now&limit=100&workspace=[workspace_id]

To break this down, you’re passing

  • assignee=me to get the tasks assigned to you
  • completed_since=now means "All tasks completed after ‘now’ " - in other words, all your incomplete tasks. If you want all tasks ever assigned to you, including complete ones, you can leave this out
  • limit=100 means “return the first 100 results” for pagination. To learn more about pagination parameters limit and offset you can refer to our docs
  • workspace=[workspace_id] is because GET /tasks requires one of workspace, project, tag, or section, and you want all your tasks in the whole workspace.

You can read more about querying for tasks here. Thanks!

2 Likes

Great Thank you! I have a follow up question how can I get the asana url for each task

is Log in - Asana

1 Like

how do I get the description

I am currently using this to get the task “https://app.asana.com/api/1.0/tasks?assignee=me&completed_since=now&limit=100&workspace=[workspace_id]2”

how do I get the description

https://app.asana.com/api/1.0/tasks?opt_fields=notes,name&assignee=me&completed_since=now&limit=100&workspace=id

You need to define opt_fields. Check the API documentation and give a try to the API explorer

2 Likes

where can I find in the documentation on how to mark a task complete

Hey @Terry_Rieckhoff, take a look at the documentation for the tasks

You are able to update a task making a PUT request
PUT /tasks/task-id and defining the completed field as true.

2 Likes

hello! its posible to get all the tasks but, no only the mines, everybody? sorry for the english