Post /api/ds/query api gives 404 response code

Making a query to data source api gives 404 response code. I have verified my data source uid and my grafana url. It is correct and works for other source api. But query a datasource grafana api gives me issue. Any help would be welcome.