Will this thing work regarding updation of Kibana dashboard through python

This is a code that I wrote by taking references from many sites:

import requests

headers = {
    'Content-Type': 'application/json',
    'kbn-version': '8.4.1'

data = {
    "options": {
        "query": {
            "bool": {
                "filter": [
                        "match": {
                            "topic": "rajamouli"

filter_id = "1663536927031"

response = requests.put(f'https://social-media-analyzer.kb.ap-south-1.aws.elastic-cloud.com:9243/s/testspace/api/input_controls/control/{filter_id}', headers=headers, json=data, auth=('username', 'password'))

But it is showing this error:

{'statusCode': 404, 'error': 'Not Found', 'message': 'Not Found'}

Please someone help me out here.

For better reference, this is what I am trying to achieve. KQL syntax with python

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.