inspirehep / rest-api-doc

Documentation of the INSPIRE REST API
https://inspirehep.net
Creative Commons Attribution Share Alike 4.0 International
40 stars 10 forks source link

access to "dataset" #26

Closed alusiani closed 2 years ago

alusiani commented 2 years ago

Hi,

I would like to use the API to get the dataset information, a link to a HEPData record that exists for a subset og inspirehep records. Is that possible? A test on https://inspirehep.net/api/literature/1392895 does not reveal this content. Would it be possible to include this information in the JSON text that is returned? In this case it should return the link https://www.hepdata.net/record/ins1392895.

Best regards,

Alberto Lusiani

michamos commented 2 years ago

Hi @alusiani, the link itself is not present in the metadata, but the information is present under external_system_identifiers. When there's a corresponding HEPData dataset, there will be an entry with schema set to HEPDATA and the record ID as a value. To reconstruct the URL, you need to prepend https://www.hepdata.net/record/ to that value. I agree it's not super user friendly though.

alusiani commented 2 years ago

Hi,

thanks for the fast feedback! The information then is indeed available, I missed it. The present format is surely usable.

Hi @alusiani, the link itself is not present in the metadata, but the information is present under external_system_identifiers. When there's a corresponding HEPData dataset, there will be an entry with schema set to HEPData and the record ID as a value. To reconstruct the URL, you need to prepend https://www.hepdata.net/record/ins to that value. I agree it's not super user friendly though.