Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@xsedla1o
Copy link
Collaborator

Proposal PR to split the /entity/{etype} endpoint into two parts. The endpoint performs two queries, fetching paged documents and counting total number of documents matching the query. While convenient, counting all documents can become expensive on large databases, so it shouldn't be done on every page fetch.

The proposal introduces two new endpoints to perform the two actions separately.

  • /entity{etype}/get - fetching the snapshot list according to query
  • /entity{etype}/count - counting all snapshot documents according to query.
  • The original endpoint was deprecated, both in DP3 docs and in API schema (Swagger UI docs).

@xsedla1o xsedla1o requested a review from dbnk0 November 21, 2024 10:01
- Added endpoint to get only documents.
- Added endpoint to get only count.
- Deprecated original endpoint.
Copy link
Collaborator

@dbnk0 dbnk0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xsedla1o xsedla1o merged commit 3209697 into master Nov 21, 2024
4 checks passed
@xsedla1o xsedla1o deleted the split_list_eids branch November 21, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants