Page MenuHomePhabricator

🥥 Create simple property prefix search endpoint
Closed, ResolvedPublic13 Estimated Story Points

Description

GET [...]/rest.php/wikibase/v0/suggest/properties?language=en&q=...
Request parameters (query parameters)

  • q - search term
  • language - language code

Response structure in pseudo-JSON

{
  "results": [
    {
      "id": "P123",
      "display-label": {
        "language": "<language code of LABEL or ALIAS>",
        "value": "<LABEL or ALIAS of the matched Item/Property>"
      },
      "description": {
        "language": "<language code of DESCRIPTION>",
        "value": "<DESCRIPTION>"
      },
      "match": {
        "type": <"label" OR "alias">,
        "language": "<language code of LABEL or ALIAS>",
        "text": "<LABEL or ALIAS that matched the search query>"
      }
    },
    ...
  ]
}

Acceptance criteria:

  • consider labels and aliases in the search, same as in the other existing RESTful search
  • matching item/property when its ID is provided as the query works, same as in the other existing RESTful search
  • Basic functionality of language fallback and matched data are implemented
  • The only sophisticated functionality to be implemented will be pagination
  • Errors to be the same as in simple property search
  • URL matching i.e. matching item/property when its URL is provided as the query, same as in SimplePropertySearch

Event Timeline

Silvan_WMDE set the point value for this task to 13.Jul 3 2025, 9:14 AM
Silvan_WMDE moved this task from Polished to Ready for planning on the Wikibase Reuse Team board.
Jakob_WMDE renamed this task from Create simple property prefix search endpoint to 🥥 Create simple property prefix search endpoint.Jul 11 2025, 8:29 AM