如何通过ClickUp API获取每个人的逾期任务列表。

huangapple go评论71阅读模式
英文:

How to get a list of overdue tasks per person via the clickup API

问题

  1. 直接的方法

如果要检查Clickup应用中的开发工具,有一个请求

https://app.clickup.com/home/team/{team_id}/inbox

带有负载

{userid: user_id, overdue_only: true, sort_by: "dueDate", sort_dir: -1, reminder_position: "top"}

这将返回一个过期任务和提醒的ID列表。这在某种程度上回答了我的问题,但它是未记录的,所以我不想某天醒来看到这个端点被废弃。

  1. 使用文档

这个想法是硬编码团队ID,获取所有团队的空间列表,然后获取每个空间的文件夹列表,接着获取每个文件夹的列表,然后获取每个空间的没有文件夹的列表,最后获取根据列表的分配人进行筛选的任务列表。对于一个简单的任务来说,这听起来太麻烦了。

有更好的建议吗?

英文:

1. Straightforward approach

If to check the dev tools in the Clickup app, there's a request

https://app.clickup.com/home/team/{team_id}/inbox

with payload

{userid: user_id, overdue_only: true, sort_by: "dueDate", sort_dir: -1, reminder_position: "top"}

That returns a list of overdue tasks+reminders IDs. It kinda answers my question, but it is undocumented, so I don't want really to wake up one day and see this endpoint is abandoned.

2. Using the documentation

The idea is to hardcode team id, get a list of all spaces per team, then a list of folders per space, then a list of lists per folders, then a list of folderless lists per space, then a list of tasks with filter on assignees per list of lists. Sounds like too much headache for a simple job.

Any better suggestions?

答案1

得分: 0

根据Clickup支持团队的建议,目前最佳选项是使用筛选任务

https://api.clickup.com/api/v2/team/%team_id%/task?assignees[]=%assignee_id%&due_date_lt=%unix_time_with_millisecinds%

英文:

As recommended by the Clickup support team, the best option (as of current version) is to use filtered tasks:

https://api.clickup.com/api/v2/team/%team_id%/task?assignees[]=%assignee_id%&due_date_lt=%unix_time_with_millisecinds%

huangapple
  • 本文由 发表于 2023年6月19日 18:42:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/76505852.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定