Stream: troubleshooting

Topic: Getting dataset breadcrumbs (containing dataverses) via API


view this post on Zulip Remie Janssen (Jul 16 2025 at 12:14):

Hello!

I'd like to use the Native API to find the (finest) dataverse that a dataset is contained in. I don't think that information is given in the JSON metadata export, and I couldn't find an endpoint to query directly for this question in the documentation. Have I missed something, or is there no such API function available?

If there is no simple way, I might have to resort to scraping it from the "breadcrumbs" in the HTML of the web page, but I'd rather not...

Thanks in advance!

view this post on Zulip Oliver Bertuch (Jul 16 2025 at 12:43):

I suspect you'd need to construct this information by retrieving the parent collection information recursively. I'm not aware of any API endpoint that immediately gives you the information you're looking for.

view this post on Zulip Oliver Bertuch (Jul 16 2025 at 12:44):

If you think such an endpoint should be added (it might be relevant for the SPA work), please feel free to create an issue. Ideally propose how you think the JSON for this should look like.

view this post on Zulip Oliver Bertuch (Jul 16 2025 at 12:45):

My 2 cents: essentially, this is a graph, so maybe it should use a knowledge graph representation to also have more metadata available from a single query.

view this post on Zulip Philip Durbin 🚀 (Jul 16 2025 at 13:06):

There are breadcrumbs in the new React frontend. https://github.com/IQSS/dataverse-frontend/pull/297 might be a good place to start looking. I'm sure @Ellen K @Cheng Shi @Germán Saracca or @Guillermo Portas would know more.

Actually, now I'm seeing returnOwners=true at https://github.com/IQSS/dataverse/pull/10322 which is probably part of the story.

view this post on Zulip Philip Durbin 🚀 (Jul 16 2025 at 13:20):

Also, from https://dataverse.nl/api/datasets/export?exporter=OAI_ORE&persistentId=doi%3A10.34894/YOMA9L , for example, you can look at "isPartOf":

"schema:isPartOf": {
  "schema:name": "UG Faculty of Medical Sciences & UMCG",
  "@id": "https://dataverse.nl/dataverse/RUGFMScUMCG",
  "schema:description": "Faculty of Medical Sciences and UMCG",
  "schema:isPartOf": {
    "schema:name": "University of Groningen",
    "@id": "https://dataverse.nl/dataverse/groningen",
    "schema:isPartOf": {
      "schema:name": "DataverseNL",
      "@id": "https://dataverse.nl/dataverse/root",
      "schema:description": "<H1>Welcome to DataverseNL</H1>..."
    }
  }
},

view this post on Zulip Germán Saracca (Jul 16 2025 at 14:06):

Hi :wave: , exactly as @Philip Durbin 🚀 is saying, returnOwners=true is doing the trick, it will return the isPartOf property. Open this URL in the browser and check the isPartOf property.

view this post on Zulip Remie Janssen (Jul 17 2025 at 08:00):

Thanks all!

The returnOwners parameter is exactly what I was looking for! The idea of using a different (or even custom) exporter might also come in handy, but I'm glad it doesn't seem necessary in this case :)

view this post on Zulip Oliver Bertuch (Jul 17 2025 at 08:03):

I was completely unaware of this new query parameter! Feeds into my argument that our API docs are increasingly unreadable... :grimacing:

view this post on Zulip Philip Durbin 🚀 (Jul 17 2025 at 13:31):

% grep returnOwners *

6.2-release-notes.md:The API endpoints for getting datasets, Dataverse collections, and datafiles have been extended to support the following optional 'returnOwners' query parameter.

view this post on Zulip Philip Durbin 🚀 (Jul 17 2025 at 13:32):

But yeah, I hear you. Please feel free to kick off a topic in #docs about the API Guide!


Last updated: Oct 30 2025 at 06:21 UTC