Skip to content

Add feed endpoints#1242

Open
clementbiron wants to merge 21 commits intomainfrom
add-feed-endpoints
Open

Add feed endpoints#1242
clementbiron wants to merge 21 commits intomainfrom
add-feed-endpoints

Conversation

@clementbiron
Copy link
Copy Markdown
Member

@clementbiron clementbiron commented Apr 29, 2026

This pull request adds Atom feed endpoints to the collection API so consumers can subscribe to recent terms updates. A new /feed endpoint exposes a collection feed, with variants at /feed/:serviceId and /feed/:serviceId/:termsType.

Contrary to what was discussed in #1238, each entry's primary alternate link points to the GitHub commit rather than to the version API. While testing the feed in real readers, a link resolving to a JSON document felt unhelpful for human consumers, who expect to land on a readable page. The version API is still exposed alongside as a related link, so programmatic consumers can discover it from the feed.

Update: each entry now exposes a single alternate link. By default it points to the version API, which works for any storage backend. Operators who want feed readers to land on a human-readable page can configure collection-api.feed.versionUrlTemplate (e.g. https://github.com/openTermsArchive/demo-versions/commit/%VERSION_ID); the placeholder is interpolated with the version's identifier.

Comment thread src/archivist/recorder/repositories/git/index.js Outdated
Comment thread src/collection-api/routes/feed.js Outdated
Comment thread src/collection-api/routes/feed.js Outdated
Comment thread src/collection-api/routes/feed.js Outdated
Comment thread src/collection-api/routes/feed.js Outdated
Comment thread src/collection-api/routes/feed.js Outdated
Comment thread src/collection-api/routes/feed.js Outdated
@clementbiron clementbiron requested a review from Ndpnt May 4, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants