h
h copied to clipboard
Docs: clarify auth needed to get highlights from API search
I was surprised to find that the search endpoint only returns bonafide annotations, and not highlights. It's not clear to me from the API docs how or if I can request highlights in addition to annotations. I checked both v1 and v2 of the API. Presumably, highlights must be available via the API as per Overview of the Hypothesis System
The sidebar uses the API to ask the service for annotations that belong to the current host page. When the annotator receives messages from the sidebar announcing the retrieval of annotations, it paints them on the host page as highlights.
....10 minutes later
I realized that my highlights didn't show up because highlights are not public by default! 🤦
Maybe it's a good idea to clarify this in the API docs in the search section?
Expected behavior: highlights in api search payload
Actual: no highlights, only annotations
Suggestion: clarify/remind that highlights are not public and auth is needed