Stream: troubleshooting

Topic: API to know collection's category


view this post on Zulip Mohsen Jafari (Apr 25 2024 at 06:25):

By using the following API:

curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/mydata/retrieve?role_ids=1&dvobject_types=Dataverse&published_states=Unpublished"

I could fetch the following information about dataverses:

"name"
"type"
"url"
"identifier"
"published_at"
"matches"
"score"
"entity_id"
"publication_statuses"
"is_draft_state"
"is_in_review_state"
"is_unpublished_state"
"is_published"
"is_deaccesioned"
"is_valid"
"date_to_display_on_card"
"parentId"
"parentName"
"parent_alias"
"user_roles"

However, I need to know the "category" of each dataverse, either. Is there any solution?

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 25 2024 at 10:12):

You could go to https://dataverse.harvard.edu/api/dataverses/open-source-at-harvard for example to see "dataverseType":"RESEARCH_PROJECTS"

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 25 2024 at 10:12):

https://guides.dataverse.org/en/6.2/api/native-api.html#view-a-dataverse-collection

view this post on Zulip Mohsen Jafari (Apr 25 2024 at 14:24):

Philip Durbin said:

https://guides.dataverse.org/en/6.2/api/native-api.html#view-a-dataverse-collection

Suppose that in the first step I fetch a hierarchy of all collections of the user; then do you mean I have to call the above API several times to get the other details (category) of each dataverse?

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 25 2024 at 15:41):

Well, you could open an issue about how the MyData API should return the category.


Last updated: Oct 30 2025 at 06:21 UTC