Extension:VisualData/API
Appearance
Slot contents can be accessed with the standard MediaWiki API:Query as follows:
api.php?action=query&format=json&prop=revisions&titles=Test%20page&rvprop=content&rvslots=*
Additionally a Visualdata query can be performed using the following api:
api.php?action=visualdataquery&format=json&schema=Book&query=%5B%5Btitle%3A%3A%2B%5D%5D&printouts=title%7Cauthors%7Cdate&limit=500&offet=0&order=date desc
which contains the following parameters:
parameter | value |
---|---|
action | visualdataquery
|
format | json
|
schema | Book
|
query | [[title::+]]
|
printouts | title|authors|date
|
limit | 500
|
offet | 0
|
order | date desc
|
Note that the query parameter can also contain an article id or page title (without enclosing it in square brackets) in order to retrieve the data related to a specific page.
The query result is returned in json format and it is responsibility of the consumer application to format it as needed.