Implemented Add canonical URL to API results

Sim

Well-known member
When retrieving threads, users, forums, posts, profile posts, media, resources etc from the REST API, it would be useful to include a canonical URL in the results for each record returned to make it easier to link directly to the element from external applications.

I know we could construct a URL based on the site's base_url and the id of the element we are linking to - but that is not the canonical URL and will result in a 301 redirect, which is not always ideal.
 
Upvote 7
This suggestion has been implemented. Votes are no longer accepted.
This and a bunch of other REST API improvements have been made in XF 2.2 and we talk about these in the final HYS for 2.2 here:

 
Back
Top Bottom