Filters, filter_expression in query SDK api

I would like to use some filters in the looker run inline query api. Here is a sample request that I am trying

{
    "model":"abcdef",
    "view": "demoview",
    "fields": [
        "demo.count"
    ],
    "filters": {
        "demoview.field_1":"No",
        "demoview.field_2": "No"  
 }
}

Note: demoview.field_1 and demoview.field_2 are yesno type of fields and they do not work with the above Filter, and I ended up with the below filter.

{
    "model":"abcdef",
    "view": "demoview",
    "fields": [
        "demo.count"
    ],
    "filters": {
        "demoview.field_1":null,
        "demoview.field_2": null
 }
}

I was trying to understand how to use filter_expression but I was not able to find any example around how to use those. Looking forward for a response.

A great way to figure out this kind of stuff is to reverse engineer it— Build the query in Looker, then run a get_query request from the API to see what the query object (and filters) look like. From there, you can rebuild it. I threw a yesno together and got:

{
  "view": "ascent",
  "fields": [
    "ascent.exclude_from_ranking"
  ],
  "filters": {
    "ascent.exclude_from_ranking": "No"
  },
  "filter_expression": null,
  "filter_config": {
    "ascent.exclude_from_ranking": [
      {
        "type": "is",
        "values": [
          {
            "constant": "No"
          },
          {}
        ],
        "id": 1,
        "error": false
      }
    ]
  }

which might be helpful as an example