Topic on Extension talk:JsonConfig

How to query jsontables from local wikidata instance using API

1
Keystester (talkcontribs)

The configuration for my jsonconfig extension in the LocalSettings.php is the following.

$wgJsonConfigEnableLuaSupport = true;
$wgJsonConfigModels['Tabular.JsonConfig'] = 'JsonConfig\JCTabularContent';
$wgJsonConfigs['Tabular.JsonConfig'] = [ 
'namespace' => 486, 
'nsName' => 'Data',
// page name must end in ".tab", and contain at least one symbol
'pattern' => '/.\.tab$/',
'license' => 'CC0-1.0',
'isLocal' => true,
'store' => true,
];

When i try to query for json tables that i have stored on the instance using the following,

<DOMAIN HERE>/w/api.php?action=query&list=search&srsearch=tab contentmodel:Tabular.JsonConfig &srnamespace=486&srlimit=10&format=json


i get the following result

{"batchcomplete":"","query":{"searchinfo":{"totalhits":0},"search":[]}}


What correction must i make to my api query statement to make this work ?

Reply to "How to query jsontables from local wikidata instance using API"