API result "URL"

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

When using the API modules to query for semantic data, different datatypes may have different output formats. This page gives an example for datatype "URL"Holds URIs, URNs and URLs 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 URL",
                "key": "Has_URL",
                "redi": "",
                "typeid": "_uri",
                "mode": 1,
                "format": ""
            }
        ],
        "results": {
            "File:0a5700dc-090b-4cf8-b562-2c94698b9f59.png": {
                "printouts": {
                    "Has URL": [
                        "http://creativecommons.org/licenses/by-nc-nd/2.0/deed.de"
                    ]
                }
            }
        },
        "serializer": "SMW\\Serializers\\QueryResultSerializer",
        "version": 2,
        "meta": {
            "hash": "1c9157d6732291ee8c18b47657c5298a",
            "count": 1,
            "offset": 0,
            "source": "",
            "time": "0.001383"
        }
    }
}