Skip to content
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

Feature - REST API search now returns total count of filtered objects trough X-Total-Count response header #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Z14tk0
Copy link
Contributor

@Z14tk0 Z14tk0 commented Nov 7, 2024

Hi,

Note:
This is continuation of work from this PR #29 so if you decide to accept this PR we can close other one as this PR contains all that's needed.
For this to be validated you will need this MidPoint branch Evolveum/midpoint#232 (currently in PR).

Usage example:

        SearchResult<UserType> searchResult = service.users().search().queryFor(UserType.class).build()
                .options()
                .returnTotalCount()
                .get();

        searchResult.getHeaders().get(""X-Total-Count"")  //Should contain total count of filtered users

Let me know if you need me to do any additional changes or work.

Thank you, Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant