v2.2.0+
Status: | effective |
Progress: | 100% |
Version: | 2.2.0+ |
API module "smwinfo"
From semantic-mediawiki.org
smwinfo | |
---|---|
Allows to access statistical data and information about the usage of Semantic MediaWiki | |
Keywords | |
Further Information | |
Provided by: | Semantic MediaWiki |
Added: | 1.6.0 |
Removed: | still available |
Table of Contents | |
The "smwinfo" API module allows access statistical data information via action "smwinfo" (?action=smwinfo
) about the usage of Semantic MediaWiki using the MediaWiki API. It was introduced with Semantic MediaWiki 1.6.0Released on 30 July 2011 and compatible with MW 1.15.x - 1.18.x..
The module supports ten parameters:
- "
proppagecount
" Allows to retrieve the total number of properties registered with a page. - "
declaredpropcount
" Allows to retrieve the total number of declared properties (properties with a datatype assigned). - "
usedpropcount
": Allows to retrieve the total number of used properties (properties with at least one property value assignment). - "
propcount
": Allows to retrieve the total number of property values (property value assignments). - "
errorcount
": Allows to retrieve the total number of improperly added values1 (available since Semantic MediaWiki 2.2.0Released on 9 May 2015 and compatible with MW 1.19.0 - 1.24.x.). - "
querycount
": Allows to retrieve the total number of queries. - "
querysize
": Allows to retrieve the total size of all queries. - "
formatcount
": Allows to retrieve the query formats used together with their total usage count. See also the output example below. - "
subobjectcount
": Allows to retrieve the total number of subobjects. - "
conceptcount
": Allows to retrieve the total number of concepts.
The parameters may be concatenated using the pipe "
|
" character. See the usage example below.
Example[edit]
../api.php?action=smwinfo&format=json&info=proppagecount|propcount|errorcount|querycount|usedpropcount|declaredpropcount|conceptcount|querysize|subobjectcount|formatcount
Output[edit]
The parameter "formatcount
" will output an array of used formats together with its count information available.
{
"info": {
"formatcount": {
"datatables": 44,
"list": 27,
"jqplotchart": 15,
"eventcalendar": 15,
"gallery": 15,
"jqplotseries": 13,
"count": 2,
"sum": 2,
"rdf": 1
}
}
}
If used in conjunction with the "External Data" extension do not forget to replace all pipe characters
|
in API URL with the {{!}}
magic word inside the {{#get_web_data:...}}
parser function.
References
- ^ Semantic MediaWiki: GitHub issue gh:smw:893