Hello everyone,
I know that this subject has been discussed in other threads
- API POST /api/card/:card-id/query/:export-format with parameters
- Help sending date parameters on api/card/:card-id/csv
- Can't pass parameters to api/card/query
and I tried to follow them as well as using the Network-tab and copying the cURL option while using the Metabase UI.
However, I think I'm still missing something.
I'm trying to request /api/card/:cardid/query/json
but, as it's mentioned in the other questions, my parameters got ignored.
Here it is my cURL request (I tried without the format and, it worked):
curl 'https://webapp-metabase.azurewebsites.net/api/card/1/query/json' \
-H 'Accept: application/json' \
-H 'Accept-Language: en-US,en;q=0.9,es;q=0.8' \
-H 'Connection: keep-alive' \
-H 'Content-Type: application/json' \
-H 'Cookie: metabase.DEVICE=REDACTED; _ga=GA1.3.406897238.1663058564; metabase.TIMEOUT=alive; metabase.SESSION=REDACTED; _gid=GA1.3.97398548.1663688080; _gat=1' \
-H 'Origin: https://webapp-metabase.azurewebsites.net' \
-H 'Referer: https://webapp-metabase.azurewebsites.net/question/1-fleet-traffic?%3Flimit=1&start_date=2021-08-01&end_date=2021-08-31' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36' \
-H 'sec-ch-ua: "Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Linux"' \
--data-raw '{"ignore_cache":true,"collection_preview":false,"parameters":[{"type":"number/=","value":["1"],"target":["variable",["template-tag","limit"]]},{"type":"date/single","value":"2021-08-01","target":["variable",["template-tag","start_date"]]},{"type":"date/single","value":"2021-08-31","target":["variable",["template-tag","end_date"]]}]}' \
--compressed
It's probably something silly but, can anyone help me with this?
Thank you all in advance!