Anyway to get dataset uuid by dataset name?

Hi John,

Is there anyway (h5pyd or rest api) to get the uuid of a dataset by its name?

Best,
Ruochen

Hey Rouchen,

Sure, in h5pyd you can just do:

dset = f[h5path]
print(dset.id.id)

Is that what you are looking for?

In the REST API you’d do: GET /groups/<parent_uuid>/links/<dset_Name>
and you’ll get a json with id key. You can see how it works with this curl:

curl http://hsdshdflab.hdfgroup.org/groups/g-d38053ea-3418fe27-e41b-edb122-4163ce/links/dset1.1.1?domain=/shared/tall.h5

BTW, we have a separate forum for HSDS related questions: https://forum.hdfgroup.org/c/hsds.

But since we are on the HDF5 forum, let me propose my small suggestion for HDF5 2.0: obj.id.id should return a guid that’s unique for that object rather than an integer. The problem with the current approach is that you can’t compare two object references by id to ascertain if they are the same object or not.

Curious to hear if any forum readers would favor this change.