Thanks! As it happens, I have geeked out on exactly this subject for Crossref Event Data (more info https://www.eventdata.crossref.org/guide/sources/ ). Though in the interests of pragmatism I am giving consideration to switching the representation, using canonical URL as the primary entity with the version as a property. It's beyond the scope of this list, but if you're interested there's more info at the above link.wikipedia/ JoeOn 11 Oct 2017 6:40 p.m., "C. Scott Ananian" <cananian@wikimedia.org> wrote:And, if you want to geek out on the semantic web, the rationale here is that there are multiple "documents" for a given article, one per revision. The semantic markup says that all of these documents are a "VersionOf" the canonical URL.--scott--On Wed, Oct 11, 2017 at 9:45 AM, Joe Wass <jwass@crossref.org> wrote:Brilliant, thanks very much Marko!JoeOn 11 October 2017 at 14:19, Marko Obrovac <mobrovac@wikimedia.org> wrote:Hello Joe,On 11 October 2017 at 14:27, Joe Wass <jwass@crossref.org> wrote:Hi there,I hope this is the right list for a RESTBase query? Let me know if this is the wrong list, or I should head over to Phabricator.I'm visiting a large number of Wikipedia pages' specific versions (for the Crossref Event Data service, if you're interested - https://www.eventdata.crossref.org/guide ). I'm getting page ids / versions from EventStreams. I'm using the RESTBase API because it gives the cleanest HTML and it was recommended to me for the volume of queries, e.g.I want to get the canonical URL for that version page, e.g.The 'normal' HTML view of a page supplies the canonical URL as a <link rel="canonical"> tag, but the RESTBase response doesn't. It does supply an isVersionOf link though:<link rel="dc:isVersionOf" href="//ceb.wikipedia.org/wiki/Quebrada_Fantasma "/>Questions:1 - Is the isVersionOf URL in RESTBase identical to the "official" canonical URL that I would get from the HTML metadata (using https:)?Yes, it is :)2 - Is the "title" component of the RESTBase URL the same as used in the Canonical URL? The Swagger docs say "Page title. Use underscores instead of spaces. Example: Main_Page". I'm not clear if that is the same thing.Yes, that is the canonical title of the page, with the exception that forward slashes need to be encoded when contacting the REST API, whereas that is not needed (but allowed) for the canonical URL. So for the page entitled "Page/SubPage", you need to provide "Page%2FSubPage" to the REST API. Note that you will still get the correct canonical URL in the `dc:isVersionOf` field.3 - Is there a general recommended way of getting the canonical URL for a page from RESTBase?You can either use the `dc:isVersionOf` field, or use the simple transform: https://{{domain}}/api/rest_v1/page/html/{title} => https://{{domain}}/wiki/{title } which is guaranteed to work. Cheers,MarkoMarko Obrovac, PhDSenior Services EngineerWikimedia Foundation
_______________________________________________
Services mailing list
Services@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/services
_______________________________________________
Services mailing list
Services@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/services
_______________________________________________
Services mailing list
Services@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/services
_______________________________________________
Services mailing list
Services@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/services
_______________________________________________
Services mailing list
Services@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/services