Preparing SPARQUE Desk for Populating a Category Tree

The categorytree endpoint is used by the Wrapper to provide the full category hierarchy. The SPARQUE Desk API should return a list of categories, with each category linked to its parent. The Wrapper uses these relationships to construct the complete tree.

Optionally, you can use the channel parameter (string) to filter the category list. Keep in mind that the final list must represent a complete tree.

In the result description, including a simple reference to the parent categories is sufficient. The Wrapper only needs one level to build the tree. See the example result description below:

	{
        "class": "https://www.sparque.ai/category",
        "level": 10,
        "mode": "full",
        "attributes": [
                {
                    "name": "description",
                    "type": "STRING",
                    "aggr": "most_frequent"
                },
                {
                    "name": "identifier",
                    "type": "STRING",
                    "aggr": "most_frequent",
                    "splitLanguages": true
                },
                {
                    "name": "image",
                    "type": "STRING",
                    "aggr": "most_frequent",
                    "splitLanguages": true
                },
                {
                    "name": "name",
                    "type": "STRING",
                    "aggr": "most_frequent"
                },
                {
                    "name": "online",
                    "type": "INTEGER",
                    "aggr": "most_frequent"
                },
                {
                    "name": "root",
                    "type": "INTEGER",
                    "aggr": "most_frequent"
                }
        ],
        "constants": [],
        "includes": [
            {
                "class": [
                    "https://www.sparque.ai/category"
                ],
                "cardinality": "1",
                "level": 11,
                "prefix": "hasParent",
                "dense": false,
                "predicate": "hasParent",
                "reverse": false
            }
        ]
    },
    {
        "class": "https://www.sparque.ai/category",
        "level": 11,
        "mode": "full",
        "attributes": [
            {
                "name": "identifier",
                "type": "STRING",
                "aggr": "most_frequent",
                "splitLanguages": true
            },
            [add optional further attributes if needed for direct Desk API calls]
        ],
        "constants": [],
        "includes": []