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

Datasets API extension for the SPA #9592

Merged
merged 19 commits into from Jun 20, 2023
Merged

Conversation

GPortas
Copy link
Contributor

@GPortas GPortas commented May 15, 2023

What this PR does / why we need it:

This PR includes new endpoints to support the SPA. Specifically, to obtain the summary field names and to obtain a dataset version through a private url token.

Edit 29/05: Included endpoints for obtaining the dataset citation text

Which issue(s) this PR closes:

Special notes for your reviewer:

The new endpoints are consumed from:

Suggestions on how to test this:

For obtaining the Dataset summary fields:

curl -X GET http://localhost:8080/api/datasets/summaryFieldNames

If you want to test custom field retrieval, update the CustomDatasetSummaryFields setting.

For obtaining a Dataset version from a private URL token:

First, create a private URL, you can use the UI for that:

private_url_ui

Copy the token from the generated URL, and send it to the new endpoint like this:

curl -X GET http://localhost:8080/api/datasets/privateUrlDatasetVersion/<PRIVATE_URL_TOKEN>

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

N/A

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

Not sure

Additional documentation:

N/A

@GPortas GPortas added this to Ready for Review ⏩ in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) via automation May 15, 2023
@GPortas GPortas moved this from Ready for Review ⏩ to IQSS Team - In Progress 💻 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) May 15, 2023
@GPortas GPortas self-assigned this May 15, 2023
@coveralls
Copy link

coveralls commented May 15, 2023

Coverage Status

coverage: 20.337% (+0.004%) from 20.333% when pulling f5653e3 on 9588-datasets-api-extension into 2d29201 on develop.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@GPortas GPortas force-pushed the 9588-datasets-api-extension branch from 57437d1 to 16ab0e8 Compare May 22, 2023 09:18
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@GPortas GPortas marked this pull request as ready for review May 22, 2023 16:16
@GPortas GPortas moved this from IQSS Team - In Progress 💻 to Ready for Review ⏩ in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) May 22, 2023
@GPortas GPortas removed their assignment May 22, 2023
@GPortas GPortas moved this from Ready for Review ⏩ to IQSS Team - In Progress 💻 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) May 26, 2023
@GPortas GPortas self-assigned this May 26, 2023
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link

📦 Pushed preview application image as

ghcr.io/gdcc/dataverse:9588-datasets-api-extension

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

@GPortas GPortas moved this from IQSS Team - In Progress 💻 to Ready for Review ⏩ in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) May 28, 2023
@GPortas GPortas removed their assignment May 28, 2023
@pdurbin pdurbin changed the title 9588 - Datasets API extension for the SPA Datasets API extension for the SPA Jun 1, 2023
@pdurbin pdurbin moved this from Ready for Review ⏩ to In Review 🔎 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Jun 12, 2023
@pdurbin pdurbin self-assigned this Jun 12, 2023
@github-actions

This comment has been minimized.

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

I merged develop in and cleaned up the tests (happy to explain more).

I left a bit of feedback on exposing database settings.

This PR needs docs. I already mentioned this to @GPortas in Braga and he said he'd add them but he's on a well-deserved vacation this week.

If we do make changes to this PR (how the APIs work), it will mean we have to change the js-dataverse PR as well.

@@ -3849,4 +3854,62 @@ public Response getExternalToolDVParams(@Context ContainerRequestContext crc,
return wr.getResponse();
}
}

@GET
@Path("summaryFieldNames")
Copy link
Member

Choose a reason for hiding this comment

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

I started a thread in Slack about being consistent in how we expose database settings: https://iqss.slack.com/archives/C010LA04BCG/p1686603802872139

This might be fine but we should make an active decision because we'll be doing this a lot for the SPA. It needs to know how the backend is configured.

@@ -10,6 +10,7 @@
import edu.harvard.iq.dataverse.authorization.RoleAssignee;
Copy link
Member

Choose a reason for hiding this comment

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

I'm just putting this here the top but this PR needs:

  • docs
  • a release note

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

I added docs and a release note. Approved.

IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from In Review 🔎 to Ready for QA ⏩ Jun 15, 2023
@pdurbin pdurbin removed their assignment Jun 15, 2023
@github-actions
Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:9588-datasets-api-extension
ghcr.io/gdcc/configbaker:9588-datasets-api-extension

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

@kcondon kcondon self-assigned this Jun 20, 2023
@kcondon kcondon merged commit 34e0d3c into develop Jun 20, 2023
16 checks passed
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from QA ✅ to Done 🚀 Jun 20, 2023
@kcondon kcondon deleted the 9588-datasets-api-extension branch June 20, 2023 14:35
@pdurbin pdurbin added this to the 5.14 milestone Jul 11, 2023
@pdurbin pdurbin mentioned this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[Spike - API] - Extend Dataset API endpoints to support the Dataset page (SPA)
4 participants