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

Getting Inspire ID and DOI from an API record #6

Closed agbuckley closed 4 years ago

agbuckley commented 4 years ago

I am updating a tool that uses the old Inspire API XML output to retrieve metadata including the Inspire ID, arXiv ID, and DOI, from searches using any of the same as keys. But in the new format, the Inspire ID and DOI don't seem to exist in the JSON output:

Could this canonical information be added to the JSON output... or did I miss something?! Thanks.

michamos commented 4 years ago

The id field is just a shortcut, all the metadata is also available under metadata:

You can find more information on the different fields available under metadata here: https://inspire-schemas.readthedocs.io/en/latest/schemas/hep.html.

agbuckley commented 4 years ago

I just found the DOIs one... not sure how I missed it. Thanks re. the control_number, I didn't guess that one!

michamos commented 4 years ago

I agree the name is not great, I'll try to clarify this in the docs.

agbuckley commented 4 years ago

Cheers!