API result "Page"

From semantic-mediawiki.org
Page
API result format for data type Page
Keywords
API · API module · API result · action ask · ask · action askargs · askargs · datatype Page

When using the API modules to query for semantic data, different datatypes may have different output formats. This page gives an example for datatype "Page"Holds names of wiki pages, and displays them as a link using API-module "ask"Allows to do ask queries. API-module "askargs"Allows to do ask queries with as little ask query specific syntax as possible however uses the same output format.

Example JSON result output[edit]

You can experiment with the api result output yourself by using the API Sandbox. The following example can be reproduced here.

{
    "query": {
        "printrequests": [
            {
                "label": "Has page",
                "key": "Has_page",
                "redi": "",
                "typeid": "_wpg",
                "mode": 1,
                "format": ""
            }
        ],
        "results": {
            "Help:Using Docker# caeeedfc9cfbfb8ded716890c081fe51": {
                "printouts": {
                    "Has page": [
                        {
                            "fulltext": "Help:Using Docker",
                            "fullurl": "https://www.semantic-mediawiki.org/wiki/Help:Using_Docker",
                            "namespace": 12,
                            "exists": "1",
                            "displaytitle": ""
                        }
                    ]
                }
            }
        },
        "serializer": "SMW\\Serializers\\QueryResultSerializer",
        "version": 2,
        "meta": {
            "hash": "97267169565cc5d65972665eecfe467a",
            "count": 1,
            "offset": 0,
            "source": "",
            "time": "0.002825"
        }
    }
}