hypothesis / hypothesis/h

Docs: clarify auth needed to get highlights from API search

Open
#6,009 0 comments 1 reaction 0 assignees View on GitHub
code health
Dominant language
Python
Stars
3.2k
Forks
459
Avg merge
27d 1h
Merged PRs (30d)
1

Description

I was surprised to find that the [search endpoint](https://github.com/hypothesis/h/blob/3430242ce46aa275c5adf89d545054bef86d75d1/h/views/api/annotations.py#L45) only returns bonafide annotations, and not highlights. It's not clear to me from the [API docs](https://h.readthedocs.io/en/latest/api-reference/v2/#tag/annotations) 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
](https://web.hypothes.is/help/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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.