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

Added new option in getDataverse endpoint for optionally retrieving child count #11259

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

GPortas
Copy link
Contributor

@GPortas GPortas commented Feb 13, 2025

What this PR does / why we need it:

Adds a new query param, returnChildCount, to getDataverse endpoint for optionally retrieving the child count, which represents the number of dataverses, datasets, or files within the dataverse.

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

If you want to obtain the child count of a Dataverse, you must set returnChildCount query parameter to true. Example:

curl "https://demo.dataverse.org/api/dataverses/root?returnChildCount=true"

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No

Is there a release notes update needed for this change?:

Yes, attached.

Additional documentation:

N/A

.setParameter("id", dv.getId());

return (amountQry.getSingleResult()>0);
public boolean hasData(Dataverse dataverse) {

Choose a reason for hiding this comment

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

🚫 [reviewdog] <com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck> reported by reviewdog 🐶
File contains tab characters (this is the first instance).

This comment has been minimized.

2 similar comments

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@GPortas GPortas marked this pull request as ready for review February 13, 2025 17:08
@GPortas GPortas added Size: 3 A percentage of a sprint. 2.1 hours. SPA These changes are required for the Dataverse SPA Original size: 3 SPA.Q1 Not related to any specific Q1 feature labels Feb 13, 2025

This comment has been minimized.

2 similar comments

This comment has been minimized.

Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:11255-child-count-get-collection-ext
ghcr.io/gdcc/configbaker:11255-child-count-get-collection-ext

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q1 Not related to any specific Q1 feature SPA These changes are required for the Dataverse SPA
Projects
Status: Ready for Review ⏩
Development

Successfully merging this pull request may close these issues.

1 participant