Malformed Custom Report Filters

I recently encountered an issue with filters being malformed when making updates to a custom report. These malformed filter strings result in unfiltered custom reports.

Here’s what I am able to reproduce:

Context

I have a Custom Report that filters out values like '(not set)'. This custom report is producing correct filtered results

Here is the JSON from organizations.reports.get (Method: organizations.reports.get  |  Apigee  |  Google Cloud)
Here we can see what the filter string is set to

{
  "name": "xxxxxxxxxxxxxxxxxx",
  "displayName": "Ricardo Test",
  "metrics": [
    {
      "name": "message_count",
      "function": "sum"
    }
  ],
  "dimensions": [
    "developer_email",
    "dc_path"
  ],
  "filter": "(developer_email ne '(not set)' and dc_path ne '(not set)'  and dc_path ne 'unknown' )",
  "createdAt": "1755204429629",
  "lastModifiedAt": "1755289475729",
  "properties": [
    {
      "value": [
        {
          "value": "foobar"
        }
      ]
    }
  ],
  "chartType": "column",
  "organization": "xxxxxxxxxxxx"
}

Issue

However, when I go to edit the custom report on the cloud console ui The filters on the cloud console ui are malformed, even though the custom report is technically still working appropriately.

Unfortunately, making any update on this ui like adding a new dimension or just updating the description breaks the filter.

Here is the JSON response from the same organizations.reports.get after updating the description to "foobarbaz"

{
  "name": "xxxxxxxxx",
  "displayName": "Ricardo Test",
  "metrics": [
    {
      "name": "message_count",
      "function": "sum"
    }
  ],
  "dimensions": [
    "developer_email",
    "dc_path"
  ],
  "filter": "(developer_email ne '(not set and dc_path ne (not set  and dc_path ne unknown')",
  "createdAt": "1755204429629",
  "lastModifiedAt": "1755290528328",
  "properties": [
    {
      "value": [
        {
          "value": "foobarbaz"
        }
      ]
    }
  ],
  "chartType": "column",
  "organization": "xxxxxx"
}

Now the filter string is malformed, and thus results in a unfiltered custom report
The same report that is looking at the same environment, during the same time frame not produces unfiltered results (seeing ‘(not set)’)

Has anyone else reported/run into this?

1 Like

From your description, this appears to be a bug in the UI. From what I understand, you can see with the Apigee API that the report is correctly configured. But when you open it on the Apigee UI, the filters are not formatted correctly, and trying to EDIT the report on the UI does not work correctly.

If that is the case, then I don’t think anyone here on the Community site will be able to help you with this problem.

I suggest you contact Google support and ask them to file a bug on the Apigee UI.

And in the meantime, edit the report using the Apigee API.

If I have misunderstood the situation, please redirect me.