import requests
url = "https://{FUSION_HOST.com}/api/templating/triggerDSL/{app}"
payload = {
    "context": {},
    "facets": {
        "fields": [
            {
                "domain": {
                    "additionalFilters": [{ "type": "<string>" }],
                    "excludedFiltersByName": ["<string>"]
                },
                "ensuredValues": ["<string>"],
                "field": "<string>",
                "limit": 123,
                "minCount": 123,
                "missing": True,
                "offset": 123,
                "prefix": "<string>",
                "sort": "count"
            }
        ],
        "groupFacets": True,
        "groupingMethod": "header_doc",
        "ranges": [
            {
                "domain": {
                    "additionalFilters": [{ "type": "<string>" }],
                    "excludedFiltersByName": ["<string>"]
                },
                "end": "<string>",
                "field": "<string>",
                "gap": "<string>",
                "hardEnd": True,
                "include": ["all"],
                "minCount": 123,
                "other": ["after"],
                "start": "<string>"
            }
        ]
    },
    "params": {},
    "queryDefinition": {
        "boostsByQuery": [
            {
                "boost": 123,
                "query": { "type": "<string>" },
                "type": "<string>"
            }
        ],
        "boostsByValues": [
            {
                "boosts": [
                    {
                        "boost": 123,
                        "key": "<string>"
                    }
                ],
                "field": "<string>"
            }
        ],
        "filters": [{ "type": "<string>" }],
        "groupedFilters": [{ "type": "<string>" }],
        "groupedQuery": { "type": "<string>" },
        "main": { "type": "<string>" },
        "namedFilters": [
            {
                "name": "<string>",
                "query": { "type": "<string>" }
            }
        ],
        "userQuery": "<string>"
    },
    "results": {
        "cursor": "<string>",
        "fields": ["<string>"],
        "group": {
            "field": "<string>",
            "leaderStrategy": { "type": "<string>" },
            "size": 123,
            "sort": [
                {
                    "order": "asc",
                    "query": { "type": "<string>" },
                    "type": "expression",
                    "value": "<string>"
                }
            ]
        },
        "highlight": {
            "count": 123,
            "defaultHighlight": True,
            "fields": ["<string>"],
            "length": 123,
            "post": "<string>",
            "pre": "<string>"
        },
        "includeRawResponse": True,
        "returnScore": True,
        "size": 123,
        "sort": [
            {
                "order": "asc",
                "query": { "type": "<string>" },
                "type": "expression",
                "value": "<string>"
            }
        ],
        "start": 123
    }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())