-
Notifications
You must be signed in to change notification settings - Fork 471
✨(backend) add documents/all endpoint with descendants #1553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
✨(backend) add documents/all endpoint with descendants #1553
Conversation
9729f00 to
170d18e
Compare
170d18e to
8e0a9a9
Compare
External dashboards need to find the latest updated documents across
the entire hierarchy. Currently this requires many API calls to
/documents/ and /documents/{id}/children for each level.
This endpoint allows retrieving all accessible documents in a single
request, enabling dashboards to efficiently display recently changed
documents regardless of their position in the hierarchy.
Signed-off-by: ChristopherSpelt <christopherspelt@icloud.com>
8e0a9a9 to
dd7f6a8
Compare
|
Thanks @ChristopherSpelt for implementing this. If this gets merged we can attach our Dashboard application and search on titles. Maybe later we can even add advanced search with integrated OpenSearch 🥇 @lunika We will also add a similair PR for Drive soon |
| self.request, queryset, self | ||
| ) | ||
|
|
||
| return self.get_response_for_queryset(queryset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will have a "flat view". Do you wan't something looking what is made on the tree endpoint ? Each children sideloaded in its parent ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lunika christopher is on holiday until beginning of january
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to be able to list all documents that are available to a user, irrelevant of the location. We want it sorted on date, where the last edited or last created document is listed first.
We also want to search all documents on title string, and when docs supports content search, we want to start searching on content, listing the most relevant document first.
Purpose
This PR adds a new
/api/v1.0/documents/all/endpoint that returns all accessible documents including their complete hierarchies (children, grandchildren, etc.), unlike the existing list endpoint which only returns top-level documents.Resolves #1497
External contributions
Thank you for your contribution! 🎉
Please ensure the following items are checked before submitting your pull request:
git commit --signoff(DCO compliance)git commit -S)<gitmoji>(type) title description## [Unreleased]section (if noticeable change)