Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

Using the New Wildcard URL Search API to Monitor Sitewide Annotation Activity

By judell | 9 November, 2018

In New Search Capability: Find All Annotations on Any Website, Katelyn Lemay introduced a new capability developed by Hannah Stepanek: wildcard URL search. Katelyn’s sample query, https://hypothes.is/search?q=url:https://elifesciences.org/*, populates the Hypothesis dashboard with (currently) 2300 annotated documents. Here are some other fun examples:

New York Times stories in 2017 (q=url:https://www.nytimes.com/*2017*)

New York Times opinion columns in 2017 (q=url:https://www.nytimes.com/*2017*opinion/*)

As Katelyn notes, these wildcard queries are based on a new API endpoint, wildcard_uri, which is a key enabler for services that monitor entire websites, or subsites, and report new activity.

There isn’t yet an official Hypothesis service that does that kind of monitoring and reporting, but we’ve upgraded a do-it-yourself solution, h_notify, to make use of wildcard_uri and the results have been enlightening. For example, here’s some chatter between Katelyn and Nate Angell regarding the above-mentioned post:

The quoted selection — “Go to https://hypothes.is/ if you want” — is crossed out because Katelyn has implemented Nate’s suggestion. And that interaction produced these alerts in an internal Slack channel.

The Slack channel is fed by an instance of h_notify that watches our website for Hypothesis activity and posts annotations or replies to Slack. Because the watcher knows the internal Slack IDs corresponding to handles like @katelyn and @nateangell, those Slack users were notified when @mentioned in the annotations. It’s a really powerful way to collaborate on the web content they’re responsible for.

If you want to try this for yourself, start with examples.py and tailor as needed. For @mention support, create a slack_namemap.json file as shown in the README. Ideally you’ll run the code on a server, but in a pinch you could even run it on an always-on-and-connected desktop computer.

Share this article