Error creating new dashboard with the API

Hi,
I am trying to create a new dashboard using the API.
I am using the code below to send a post request with a JSON payload.

json_payload = {
    'name': '5',
    'description': None,
    'parameters': [
        {'name': 'Date Filter', 'type': 'date/all-options', 'default': '2017-01-01~', 'slug': 'date_filter'},
        {'name': 'Category', 'type': 'category', 'default': ['A'], 'slug': 'category'},
        {'name': 'Category 1', 'type': 'category', 'default': ['M'], 'slug': 'category_1'}
                          ]}
dashboard = metabase.post('/api/dashboard/', json=payload)

The post request works fine and it creates the dashboard. But the issues are,

  • the default values are not applied (for the dates) and for the remaining two filters the default values are 'M' instead of 'A' and 'M' respectively. (image attached)
    image
  • If I modify the default value of one of the filters(say, the date) then the default values of the remaining two filters switch to the default value of the modified filter. Sorry, as a new user I can only attach one image.

If I pull the attributes of the new dashboard I can see that the default values are set to what was in the json_payload but it does not reflect in the UI.

Thank you.