/api/dataset/ returned "missing-required-key"

When I tried to 'POST' this data (below)

I getting error that said:

{
    "database_id": 82,
    "started_at": "2023-03-22T11:44:53.686+08:00",
    "error_type": "invalid-query",
    "json_query": {
        "database": 82,
        "query-type": "native",
        "query": "SELECT * FROM wmwhse1.ORDERS o where o.orderkey='0000774590'",
        "middleware": {
            "js-int-to-string?": true,
            "add-default-userland-constraints?": true
        }
    },
    "status": "failed",
    "class": "class clojure.lang.ExceptionInfo",
    "stacktrace": [
        "--> util.schema$schema_core_validator$fn__10572.invoke(schema.clj:29)",
        "query_processor.middleware.validate$validate_query$fn__50978.invoke(validate.clj:9)",
        "query_processor.middleware.normalize_query$normalize$fn__50985.invoke(normalize_query.clj:22)",
        "query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__48350.invoke(add_rows_truncated.clj:35)",
        "query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__49641.invoke(results_metadata.clj:82)",
        "query_processor.middleware.constraints$add_default_userland_constraints$fn__48368.invoke(constraints.clj:42)",
        "query_processor.middleware.process_userland_query$process_userland_query$fn__50919.invoke(process_userland_query.clj:146)",
        "query_processor.middleware.catch_exceptions$catch_exceptions$fn__51307.invoke(catch_exceptions.clj:169)",
        "query_processor.reducible$async_qp$qp_STAR___43282$thunk__43283.invoke(reducible.clj:103)",
        "query_processor.reducible$async_qp$qp_STAR___43282.invoke(reducible.clj:109)",
        "query_processor.reducible$sync_qp$qp_STAR___43291$fn__43294.invoke(reducible.clj:135)",
        "query_processor.reducible$sync_qp$qp_STAR___43291.invoke(reducible.clj:134)",
        "query_processor$process_userland_query.invokeStatic(query_processor.clj:247)",
        "query_processor$process_userland_query.doInvoke(query_processor.clj:243)",
        "query_processor$fn__52324$process_query_and_save_execution_BANG___52333$fn__52336.invoke(query_processor.clj:258)",
        "query_processor$fn__52324$process_query_and_save_execution_BANG___52333.invoke(query_processor.clj:251)",
        "query_processor$fn__52368$process_query_and_save_with_max_results_constraints_BANG___52377$fn__52380.invoke(query_processor.clj:270)",
        "query_processor$fn__52368$process_query_and_save_with_max_results_constraints_BANG___52377.invoke(query_processor.clj:263)",
        "api.dataset$run_query_async$fn__65303.invoke(dataset.clj:69)",
        "query_processor.streaming$streaming_response_STAR_$fn__38418$fn__38419.invoke(streaming.clj:162)",
        "query_processor.streaming$streaming_response_STAR_$fn__38418.invoke(streaming.clj:161)",
        "async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:65)",
        "async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:63)",
        "async.streaming_response$do_f_async$task__26888.invoke(streaming_response.clj:84)"
    ],
    "card_id": null,
    "context": "ad-hoc",
    "error": [
        "not",
        [
            "map?",
            "a-java.lang.String"
        ]
    ],
    "row_count": 0,
    "running_time": 0,
    "ex-data": {
        "type": "schema.core/error",
        "value": {
            "database": 82,
            "query-type": "native",
            "query": "SELECT * FROM wmwhse1.ORDERS o where o.orderkey='0000774590'",
            "middleware": {
                "js-int-to-string?": true,
                "add-default-userland-constraints?": true
            },
            "info": {
                "executed-by": 197,
                "context": "ad-hoc",
                "nested?": false,
                "query-hash": "0x2D628754"
            },
            "constraints": {
                "max-results": 10000,
                "max-results-bare-rows": 2000
            }
        },
        "error": {
            "type": "missing-required-key",
            "query": "schema.utils.ValidationError@634c7021"
        }
    },
    "data": {
        "rows": [],
        "cols": []
    }
}

When i execute query on my tool or metabase web interface the data is coming out which is my query should be OK (it also just a simple query)

I don;t know whay it said invalid-query

please post diagnostic info

I am just a user to this instance. The version that been use is version v0.42.2. But I can fetch /api/session/properties but the value is so long, and I'm afraid of accidentally posting sensitive information. If you can let me know which key should i check on the JSON, I maybe can filter out and post here

Please upgrade to the latest version, also please use the browser to check exactly what is Metabase expecting in the payload when you do the API call so you can copy. Clearly there's something missing in the API call which is causing errors

I dont have authority to do so. But I managed to solve my problem. I am sharing here, incase someone is also looking for the same issue in future

{
    "database": 82,
        "native": {
            "query": "SELECT * FROM wmwhse1.ORDERS o where o.orderkey='0000774590'",
            "template-tags": {}
        },
        "type": "native",
        "middleware": {
            "js-int-to-string?": true,
            "add-default-userland-constraints?": true
        }
}