Page MenuHomePhabricator

Provide a function that fetches Wikidata entities using the action API
Closed, ResolvedPublic

Description

Description

The orchestrator would benefit from having code that retrieves Wikidata entities using the action API (action=wbgetentities), as discussed in T368654 .

Reasons:

  • Our current use of Special:EntityData only supports one entity returned per call; for some use cases (including T383631) it will be desirable to fetch multiple entities at once.
  • wbgetentities will support the optimization parameters envisioned by T382921.
  • In fetching items, the props parameter of wbgetentities can be used for optimization purposes.

The relevant code (and location for new code) is in db.js.

See T368654 for some discussion of the characteristics of these two APIs.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • The response time from Wikidata should be no greater then it is currently (except marginally to allow for returning multiple items).

Completion checklist

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Implement built-in Z6930/Find lexemes for a Wikidata itemrepos/abstract-wiki/wikifunctions/function-orchestrator!285dmartinT383631main
Update function-schemata sub-module to HEAD (12fce6f)repos/abstract-wiki/wikifunctions/function-evaluator!314jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (12fce6f)repos/abstract-wiki/wikifunctions/wikilambda-cli!62jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (12fce6f)repos/abstract-wiki/wikifunctions/function-orchestrator!284apinesync-function-schematamain
Add utility function isEntityIdrepos/abstract-wiki/wikifunctions/function-schemata!191dmartinT383644main
Customize query in GitLab

Event Timeline

DMartin-WMF renamed this task from Consider switching from Special:EntityData to wbgetentities for fetching Wikidata entities to Provide a function that fetches Wikidata entities using wbgetentities .Feb 3 2025, 4:22 PM
DMartin-WMF updated the task description. (Show Details)
DMartin-WMF renamed this task from Provide a function that fetches Wikidata entities using wbgetentities to Provide a function that fetches Wikidata entities using the action API.Feb 3 2025, 4:27 PM
DMartin-WMF updated the task description. (Show Details)
DSantamaria changed the task status from Open to In Progress.Feb 6 2025, 12:11 PM

Change #1119191 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2025-02-03-215824 to 2025-02-12-171406

https://gerrit.wikimedia.org/r/1119191

Change #1119191 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2025-02-03-215824 to 2025-02-12-171406

https://gerrit.wikimedia.org/r/1119191

Change #1120991 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Update orchestrator from 2025-02-12-171406 to 2025-02-19-134350

https://gerrit.wikimedia.org/r/1120991

Change #1120992 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Update evaluators from 2025-02-11-155338 to 2025-02-19-135838

https://gerrit.wikimedia.org/r/1120992

Change #1120991 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Update orchestrator from 2025-02-12-171406 to 2025-02-19-134350

https://gerrit.wikimedia.org/r/1120991

Change #1120992 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Update evaluators from 2025-02-11-155338 to 2025-02-19-135838

https://gerrit.wikimedia.org/r/1120992

Change #1125186 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (a6def55)

https://gerrit.wikimedia.org/r/1125186

Change #1125186 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (a6def55)

https://gerrit.wikimedia.org/r/1125186