Access activities through API

Hi!
For a stakeholder, I need a list of all open tasks in a project sorted by latest activity (as shown at the bottom of the task detail view). We tried accessing this data via API but failed. See also support ticket #8855832 for this. I am not sure if the /timeline endpoint is the correct one. How would you address this requirement?
Cheers,
Christian

Hi @Christian9,

if you need the tasks of a project sorted by latest activity, you could try to get the tasks using ordering from the API.

For example, the following request should give you all tasks of a project ordered by latest updated date descending.
/projects/:projectId/projecttasks?orderby=updatedOn desc

Let me know if you need more help.

the problem with that is that the last updated field contains internal/system changes as well so it is not identical to the activity list that you can see in the task.

We don’t have an endpoint that returns all user activities of all related entities of a project unfortunately. One option I could think of is that you would have to calculate this latest task activity from the changes you are interested in, for example creating a comment, which you could fetch from the API.

interesting - the logic what to show in the activities section of the task details is doing the same thing, right?

Are you willing to share how you are doing that so we can replicate it with our custom view?

We use serval internal endpoints to aggregate this which are currently not exposed. We have this on our API improvement list though.

Allright, sounds like a plan. Can you share an expected release quarter or at least year? In the mean time, we are sorting by last comment and ask our colleagues to write a short comment into a task whenever they do a change.

I’ll ask the team responsible for this area to see if they have this on their roadmap already.

1 „Gefällt mir“