How to obtain metrics through the API?

Hey, I’m using the Asana API to get metrics grouped by user for example how many pending tasks a user has, how many tasks will be due in the next 7 days. I’m using this endpoint {{baseUrl}}/workspaces/:workspace_gid/tasks and I thought to get all the tasks and apply the filters in my backend. Maybe there is some endpoint that brings that information similar to the admin panel?
Something like this


Welcome, @Luis_Pillaga,

Sorry, but that info isn’t directly available from the API.

You can derive as much as you can with the basic endpoints, just as you indicated, making your own summations. (Remember that the authentication you use governs the access you have.)

If on an Enterprise account, see also:

for exports available, and the use of a Service Account for access.


1 Like

Hi @Luis_Pillaga

I don’t know about other metrics, but to get tasks due in the next X days for a user (including overdue), you can use this:

GET /workspaces/xxx/tasks/search?assignee.any=yyy&due_on.before=2023-07-15&completed=false&limit=100&opt_fields=id&is_subtask=false

Warning, if you get more than 100 results in your response, you must use a special pagination process that is not the same as in all other endpoints.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.