Test data alert execution fails

I am doing similar to this in my python code to execute test data alert

curl -s -X POST   -H "X-Holistics-Key: $HOLISTICS_API_KEY"   -H "Content-Type: application/json"   -d @alert_1099511668341.json   https://us.holistics.io/api/v2/data_alerts/submit_execute

It give me following error
{“type”:“BaseError”,“message”:“Filter not found: 1099511679198:project_name”}

I tried removing this field from dynamic_filter_presets, but then it complains.

Snippet of my data looks like following

 "dynamic_filter_presets": [
      {
        "id": 1099511731489,
        "preset_condition": {
          "operator": "is",
          "modifier": null,
          "values": [
            "Commercial Truck"
          ],
          "options": null
        },
        "dynamic_filter_id": "1099511679198:project_name",
        "public_changeable": null,
        "public_hidden": null,
        "dynamic_filter_label": null,

Can someone help me please?

Hi Vivek,

It looks like the error is occurring because there is no filter with the username project_name in the dashboard with ID 1099511679198(https://us.holistics.io/dashboards/v4/1099511679198)

Could you please double-check this on your end?

Additionally, could you share more details on how you’re obtaining the dynamic_filter_presets JSON? That context would help us better identify the root cause of the issue.

I am getting dynamic_filter_presets from

curl -s -X GET \
  -H "X-Holistics-Key: $HOLISTICS_API_KEY" \
  "https://us.holistics.io/api/v2/data_alerts/<ALERT_ID>" | jq '.'

Sample data, I might not be able to share more on public platform.

"dynamic_filter_presets": [
      {
        "id": 1099511731489,
        "preset_condition": {
          "operator": "is",
          "modifier": null,
          "values": [
            "Commercial Truck"
          ],
          "options": null
        },
        "dynamic_filter_id": "1099511679198:project_name",
        "public_changeable": null,
        "public_hidden": null,
        "dynamic_filter_label": null,
        "condition_display_value": "is \"Commercial Truck\"",
        "permissions": {
          "read": true,
          "crud": true
        }
      },
      {
        "id": 1099511731490,
        "preset_condition": {
          "operator": "is",
          "modifier": null,
          "values": [
            "Aurora Driver 1.3"
          ],
          "options": null
        },
        "dynamic_filter_id": "1099511679198:milestone",
        "public_changeable": null,
        "public_hidden": null,
        "dynamic_filter_label": "Milestone",
        "condition_display_value": "is \"Aurora Driver 1.3\"",
        "permissions": {
          "read": true,
          "crud": true
        }
      },

Hi @Vivek_Rathi,

The error happens because the dashboard filter with uname project_name is currently missing (or was deleted) from the dashboard, while the data alert still contains a preset referencing that filter.

We’ll forward this to our team for review and improvement on the validation/error handling behavior.

As a workaround, you can either:

  • Go to the data alert and remove the filter preset with id project_name (or you can use API to update the data alert)
  • Or go to the dashboard and recreate the filter with uname project_name

After updating either side, the submit_execute API should work again.

Thanks!