Page MenuHomePhabricator

action=wbgetentities should contain information about redirect resolving
Closed, ResolvedPublic


When query the action=wbgetentities api action with a id which is a redirect the api result does not contains information about the redirect resolving. This makes it impossible to remap ids on the client for further processing.

The normal action=query&titles= for example contains a redirect section with the information about from and to.

I am using format=xml which does not contain this information.
For format=json there is this information because the index for the array contains the old id and the id= property contains the new one.

Please add a resolving section. Thanks.

Event Timeline

Umherirrender raised the priority of this task from to Needs Triage.
Umherirrender updated the task description. (Show Details)
Umherirrender subscribed.
hoo set Security to None.
Lydia_Pintscher added subscribers: daniel, aude, hoo and 2 others.

So for example ?action=wbgetentities&ids=Q4

    "entities": {
        "Q4": {
            "pageid": 1,
            "ns": 0,
            "title": "Q1",
            "lastrevid": 999,
            "modified": "2015-01-17T00:44:03Z",
            "id": "Q1",
            "type": "item",
            "redirected": "Q4",
            "labels": {
                "en": {
                    "language": "en",
                    "value": "some label"

Any objections to this format?

I would like something like this:

"redirects": [
        "from": "Q2745924",
        "to": "Q1641487"

These redirects seems to use the redirect table, that allows the use of ApiPageSet with its function getRedirectTitlesAsResult and possible getNormalizedTitlesAsResult to include also normalization (like q4 -> Q4)

Change 204758 had a related patch set uploaded (by Addshore):
Add redirect info to wbgetentities result

Change 204758 merged by jenkins-bot:
Add redirect info to wbgetentities result

hoo removed a project: Patch-For-Review.