Last modified: 2014-06-04 20:29:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40971, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38971 - API: Access old versions of items
API: Access old versions of items
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks: repoapi
  Show dependency treegraph
 
Reported: 2012-08-02 12:22 UTC by denny vrandecic
Modified: 2014-06-04 20:29 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description denny vrandecic 2012-08-02 12:22:42 UTC
Extend the API to provide access to old versions of an item.
Comment 1 Daniel Kinzler 2012-09-21 08:55:25 UTC
The easiest way would be to allow the wbgetitemsbyid module (class ApiGetItemsById) to fetch items based on revision IDs as an alternative to page IDs or site/title pairs. This should be very similar to returning items based on page ID.
Comment 2 Gerrit Notification Bot 2013-09-13 23:56:57 UTC
Change 84187 had a related patch set uploaded by Legoktm:
[WIP] API GetEntities: Access old versions of items

https://gerrit.wikimedia.org/r/84187
Comment 3 Kunal Mehta (Legoktm) 2013-09-14 03:19:16 UTC
I'm going to post some questions about the implementation here since Gerrit sucks for discussion.

1) Should we require &ids= (or &sites/&titles) to be set when getting an old revision?

2) How do we represent getting multiple old revisions? Right now a request looks like:

{
    "entities": {
        "Q1": {
            "pageid": 129,
        },
        "Q2" : blah
}

I'm thinking we can add a revisions key inside each entity, and that would be an array. So like:

{
    "entities": {
        "Q1": {
            "pageid": 129,
            "revisions": [
                 { entity content for rev 14 }, { entity content for rev15 }
            ]
        }
    },
}

Thoughts?
Comment 4 denny vrandecic 2013-09-19 11:02:36 UTC
1) Make it consistent with what MediaWiki does for normal wikitext (IIRC it does not require to set the ids when the revid is given, so I would do the same here, but please check this statement).

2) that solution looks sensible, but make it an object so you can access them directly without having to loop over the revisions, i.e.

 "revisions": {
    "14" : { entity content for rev 14 },
    "15" : { entity content for rev15 }
 }

instead of 

  "revisions": [
                 { entity content for rev 14 }, { entity content for rev15 }
            ]
Comment 5 Gerrit Notification Bot 2014-01-06 06:24:37 UTC
Change 84187 abandoned by Legoktm:
[WIP] API GetEntities: Access old versions of items

https://gerrit.wikimedia.org/r/84187
Comment 6 Kunal Mehta (Legoktm) 2014-01-06 06:25:47 UTC
I don't have time to finish my patch, anyone else should feel free to restore it and do so.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links