API result "Text"

From Linux Web Expert

Revision as of 04:37, 19 March 2019 by >Kghbln (add)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Text
API result format for data type Text
Keywords
API · API module · API result · action ask · ask · action askargs · askargs · datatype Text

When using the API to query for semantic data, different datatypes may have different output formats. This page gives an example for datatype "Text"Holds text of arbitrary length 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

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 text",
                "key": "Has_text",
                "redi": "",
                "typeid": "_txt",
                "mode": 1,
                "format": ""
            }
        ],
        "results": {
            "Help:In-text annotation/es": {
                "printouts": {
                    "Has text": [
                        "fc00:123:8000::/%6"
                    ]
                }
            }
        },
        "serializer": "SMW\\Serializers\\QueryResultSerializer",
        "version": 2,
        "meta": {
            "hash": "bfe3478863b0d03e8e9d3e3d22f9b244",
            "count": 1,
            "offset": 0,
            "source": "",
            "time": "0.001985"
        }
    }
}