Page MenuHomePhabricator

Return formatted permanent links via an API request
Open, Needs TriagePublic

Description

This task involves the work with making it possible for the apps to make an API request that will return them the permanent link for any arbitrary comment/topic someone is attempting to generate a permanent link to.

Note: this work also ensures the Editing Team has the flexibility to iterate upon the permanent URL structure (T302012) needing to worry about breaking the permanent link experiences the Android and iOS apps may be offering.

Requirements

TODO: Android, Editing, and iOS engineering teams to converge on requirements

Event Timeline

The idea is to return a link, not necessarily the new permalink that'll work through archival. If the permalink isn't yet available for the comment we'll provide one of the existing page+fragment links.

I'm not clear on whether it's set up to check for permalink-existence for a pageful of comments at once, which is going to affect whether we just add a url field to the existing API or need a new API to request a link for a specific comment. @matmarex?

We could add it to the existing API.

I think if we ensure that all comments have permalinks, and that any future changes to the canonical permalink structure leave behind redirects, then providing the whole URL via the API seems like a waste. If we don't want to hard-code "Special:GoToComment/%" in a bunch of repos, we can add it to the site config API, but that may be excessive?