Metabase API Paramaters object Issue

I have just upgraded my metabase from 0.41.6 to 0.43.1 mainly just because the Google Analytics connection changed.

I use metabase restful APIs a lot and my application relies on its output.

After upgrading, all /api/card/111/query where I use "paramaters" in the payload, all got broken. I looked for any reference where I can see how paramaters object can be populated or any changes associated with it but no luck.

Appreciate any help here.. Thanks.

This is a sample of the request

{
"parameters": [
{
"type": "date/all-options",
"value": "2022-02-01~2022-05-24",
"target": [
"dimension",
[
"field",
60730,
null
]
]
}
]
}

expcetion error:
{
"type": "clojure.lang.ExceptionInfo",
"message": "Invalid parameter: Card 111 does not have a template tag named nil.",
"data": {
"type": "invalid-parameter",
"invalid-parameter": {
"type": "date/all-options",
"value": "2022-02-01~2022-05-24",
"target": [
"dimension",
[
"field",
60730,
null
]
]
},
"allowed-parameters": null
},
"at": [
"metabase.query_processor.card$fn__69785$validate_card_parameters__69790$fn__69791",
"invoke",
"card.clj",
160
]
}

Hi @melaghil
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.
A lot of filter API requests were changed in v42 to allow more flexibility (in upcoming versions) and fix a lot of issues.

Thank you @flamber, that is exactly what I'm doing but I cannot see anything related to paramaters objects and how to use. Even filter the data, its is call totally different API which is dataset.

Any thoughts?

@melaghil If you are doing this in relation to a dashboard, then check the requests there.
The filtering was almost completely rewritten in 42. You'll have to make changes to your API calls.

Thank you @flamber, will check out the dashboard filtering.

Basically all I'm after is samples of how this paramaters attribute could be used with diemsions. and various options. Any samples you may have will be highly appreciated. Have a great day.

@melaghil You have to use /api/dashboard/:dashId/dashcard/:dashCardId/card/:cardId/query if you are using GUI questions.
We're working to parameterize GUI questions, which might arrive in 44.