`GET [...]/rest.php/wikibase/v0/search/properties?language=en&q=...`
Request parameters (query parameters, both mandatory)
* `q` - search term
* `language` - language code
Response structure in pseudo-JSON
```
{
"results": [
{
"id": "P123",
"label": { "language": "<LANGUAGE>", "value": "<LABEL value and language it's in>" }
"description": { "language": "<LANGUAGE>", "value": "<DESCRIPTION value and language it's in>" }
},
...
]
}
```
Response:
- always respond with status code 200, even for an empty result list
- Error handling and validation to be the same as for [[ https://phabricator.wikimedia.org/T386226 | simple item search ]]
- `mul` is not a valid search language code
Not in scope:
- no special treatment of `haswbstatement` etc "keywords". Pass them as-is
- search results provided in an asynchronous response
In scope:
- including a matched data element in the response
- language fallback of labels or descriptions in the search results
- "input sanitization" that existing functionality interacting with Cirrus search/ Elastic search should be included here
- no hard dependency on Cirrus search extension -- the API should return no results/empty results list with no search backend. In other wordsuse a simple term store database search, the first iteration does not have to do anything special when no Elastic search is there, but software should not "explode" (no code paths triggering exceptions etc)see [[ https://phabricator.wikimedia.org/T386226 | simple item search ]]