Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Hypothes.is API not fetching annotations by DOI #35

Open
rowan08 opened this issue Mar 5, 2019 · 3 comments
Open

Hypothes.is API not fetching annotations by DOI #35

rowan08 opened this issue Mar 5, 2019 · 3 comments
Assignees

Comments

@rowan08
Copy link
Member

rowan08 commented Mar 5, 2019

The hypothesis plugin is failing to retrieve annotations when querying the Hypothes.is API, using the DOI of a book. A similar problem was encountered when trying to retrieve Hypothes.is annotations for books from the Crossref Event Data API.

Following the Hypothes.is guidelines (https://web.hypothes.is/help/how-hypothesis-interacts-with-document-metadata/), we have embedded the DOI of our books in the EPUB reader page, using the Dublin Core meta tag, but annotations from these pages do not show up when querying the Hypothes.is API by DOI, even though they can be fetched using the URL of the page, e.g. annotations for using the wildcard query https://hypothes.is/api/search?wildcard_uri=https://www.ubiquitypress.com/site/books/10.5334/baj/read/?loc=* are not found when querying based purely on DOI: https://hypothes.is/api/search?uri=doi:10.5334/baj

We have contacted the Hypothes.is support team, and they are looking into this issue.

Until it is resolved. we will only be able to fetch book annotations by URL, rather than DOI.

@rowan08 rowan08 self-assigned this Mar 5, 2019
@yoannspace
Copy link
Contributor

The API search call: https://hypothes.is/api/search?uri=doi:10.5334/baj seems to be work

@rowan08
Copy link
Member Author

rowan08 commented Feb 25, 2020

From what I understand, the problem is that Hypothesis will link a DOI to a single URL, so it will ignore any other URLs that the book can be read at - which is especially a problem with the EPUB reader, which uses separate URLs for different sections of the book.

So in the example, https://hypothes.is/api/search?uri=doi:10.5334/baj: The annotation it finds is from the landing page of the book. But it fails to return any annotations from within the EPUB reader itself.

i.e. it misses all the annotations found when checking https://hypothes.is/api/search?wildcard_uri=https://www.ubiquitypress.com/site/books/10.5334/baj/read/?loc=*
(note, when clicking on this URL, you will need to manually add in the * at the end, otherwise, the search will raise an error)

@yoannspace
Copy link
Contributor

How about querying hypothes.is x times (at least 2 when EPUB reader is involved)?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants