Not able to do MBQL to native conversion using api

POST request on "/api/dataset/native" gives a 500 response error

query = '{"database": 3, "query": {"source-table": 26}, "type": "query"}'
print(mb.post('/api/dataset/json',params={"query":q}))

searched a lot but was not able to find the solution
but I found this on GitLab here

not able to find endpoint "/api/dataset/native" is this endpoint deprecated?

other endpoints of "/api/dataset/" are working fine

Hi @sky121
Did you check the documentation?
https://github.com/metabase/metabase/blob/master/docs/api-documentation.md#post-apidatasetnative
The best way to learn the API, is to just use Metabase while having your browser developer Network-tab open and looking at the request, and what data is being send/received.