Task overview on a user level (Content API)
Dear developer community,
We are currently building a 'work dashboard' tool, that aggregates information from different application databses and APIs. One of the sources we use is the Box Content API, to create an 'Open tasks on Box' counter for every user.
As far as our developers have been able to find, you can only find tasks on the document level. This means we have to maintain an index of files and periodically scan them to find changes in the tasks (new, or closed). However, this is only maintainable for a relatively small amount of documents. We are planning to expand our task counter across all files in Box, but the time to 'scan' all files (around 300k) is simply too long to be feasable taking the rate limit into account.
So my question is if there is a smarter way to tackle this problem? What is the optimal way to gather box tasks information on the user level? Is there an API endpoint we missed? Is there a way to know near real-time when a task is updated/closed?
-
Tasks can be returned if you already know the Task ID
https://docs.box.com/reference#task-object
How about using the Box Events stream to listen for all new event types "TASK_CREATE" & "TASK_ASSIGNMENT_CREATE"
From the TASK_CREATE event you can see the source_item_id="53704104665" which is the file ID. This would get around scanning all 300K files in Box for tasks. You could also call the "Get Tasks for a File" endpoint to see all tasks for that file
However, one of the easiest ways to display this type of information may to think about leveraging a 3rd party SIEM tool such as Splunk. I added the "Splunk Add On for Box" and could immediatley start querying all Box data including EVENTS and TASK objects
This can then be displayed visually in a dashboard along with other imported data sources.
-
Hi Peter,
Is there an underlying reason why the list of task_assignments associated with a user cannot be retrieved, similar to the way that a users group memberships can be retrieved?
e.g. GET /users/USER_ID/assignments
It seems like it should be there, but is there a reason why it cannot be implemented (other than insufficient round tuits)?
I asked this once before (to the content-api-features mailbox) but never got an answer...
-
Hi,
I can see this topic was raised a few years ago and there has been no satisfactory answer.
I also need to be able to use API to get a list of tasks assigned to a user. Similar to when I ( the user) check their tasks in Box Relay https://app.boxrelay.com/app/0/inbox
Anyone has any suggestion on how this ?
Please sign in to leave a comment.
Comments
3 comments