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 Request/Idea: Clarify/improve creation and publication dates of collections in results of Search API and "View a Dataverse Collection" endpoint #9713

Open
jggautier opened this issue Jul 18, 2023 · 2 comments

Comments

@jggautier
Copy link
Contributor

jggautier commented Jul 18, 2023

Overview of the Feature Request

What kind of user is the feature intended for?
(Example users roles: API User, Curator, Depositor, Guest, Superuser, Sysadmin)
API User

What inspired the request?
My use of the Search API and Native API to get information about Dataverse collections

What existing behavior do you want changed?
Could we review and possibly improve the dates in the results of the two API endpoints?

When items in Search API results are collections (when "type" is "dataverse"), it looks like one date is always included and it's always called "published_at". When the collection is published, that date is the collection's publication date. When the collection is unpublished, that date seems to be the collection's creation date.

This collection is unpublished and here's what's returned by the Search API call https://demo.dataverse.org/api/search?q=dvAlias:testing23987&type=dataverse&key={apikey} (replacing {apikey} with an API key that has edit permissions on the collection):
Screenshot 2024-07-22 at 11 11 53 AM

This makes it harder to determine if and when collections are published and what each collection's creation and publication dates are.

When using the Native APIs "View a Dataverse Collection" endpoint, it looks like one date is always called "creationDate" and it's the date when the collection was created.

This collection is published and what's returned by the "View a Dataverse Collection" endpoint call https://demo.dataverse.org/api/dataverses/juliangautier, which includes only a createDate:
Screenshot 2023-07-18 at 12 03 46 PM

This makes it harder to determine if collections are published and impossible to know when they were published.

Any brand new behavior do you want to add to Dataverse?
Maybe for the Native APIs "View a Dataverse Collection" endpoint, when the collection is published, a publicationDate key could be added. Its presence or absence could be used to figure out if the collection is published and its publication date. Additionally, maybe a key could be added that more explicitly shows the publication state of the collection, something like "isPublished" or publicationState.

Maybe for the Search API, a created_at key could be added that always shows when the collection was created. And the published_at key could be used only to show when published collections were published.

Any open or closed issues related to this feature request?
None that I could find.

@pdurbin
Copy link
Member

pdurbin commented Jul 19, 2023

From a quick look at the Search API code it looks like the intention was for published_at to only be present when it's published. So I'd say it's a bug if a date is appearing there for drafts (I didn't check this myself). Yes, a new created_at field sounds good.

@jggautier
Copy link
Contributor Author

#9788 is related

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

No branches or pull requests

2 participants