Compound Filters with Analytics API

Not applicable

In the Edge "New Custom Report" GUI I am able to create a compound filter statement that appears like this:

(proxy_pathsuffix like '%delivery-windows') and (apiproxy eq 'Customers')

I am trying to do the same thing through an API call. I can set the "filter" argument to either of the conditions above and the call returns results, but if I use the full string above I receive a 500 - Internal Server Error. I'm not sure if the syntax is wrong or if there is something else going on, such as a timeout threshold being reached (I've noticed that the execution time in these cases tends to be very close to 30 seconds).

I haven't found anything in the online documentation that talks about compound filters, but I'm assuming it's possible since I can do it in the UI.

0 3 396
3 REPLIES 3

Hey @Mike Overholt -

This may be a bug. I've been able to reproduce the 500 with your compound filter, but I've also gotten successful calls with it. For example, I was able to get a successful API call when I changed eq to like in the second expression. Then, when I switched it back to eq, which failed at first, it worked. I'll file a ticket. (UAP-609)

@Floyd Jones

Thanks - any update on this? I tried it again today and am no longer receiving a 500 response. Here's what I'm seeing:

If I make the call using only the apiproxy condition

(apiproxy eq 'Customers')

I receive over 150 results ("metrics" blocks), 11 of which have a proxy_pathsuffix that ends with "delivery-windows".

{
  "environments" : [ {
    "dimensions" : [ {
      "metrics" : [ {
        "name" : "sum(message_count)",
        "values" : [ "65.0" ]
      }, {
        "name" : "min(total_response_time)",
        "values" : [ "867.0" ]
      }, {
        "name" : "max(total_response_time)",
        "values" : [ "5010.0" ]
      }, {
        "name" : "avg(total_response_time)",
        "values" : [ "1241.153846153846" ]
      } ],
      "name" : "/something/delivery-windows"
    }, {
...many more here...
    }, {
      "metrics" : [ {
        "name" : "sum(message_count)",
        "values" : [ "3.0" ]
      }, {
        "name" : "min(total_response_time)",
        "values" : [ "96.0" ]
      }, {
        "name" : "max(total_response_time)",
        "values" : [ "114.0" ]
      }, {
        "name" : "avg(total_response_time)",
        "values" : [ "103.0" ]
      } ],
      "name" : "/something"
    } ],
    "name" : "prod"
  } ],
  "metaData" : {
    "errors" : [ ],
    "notices" : [ "query served by:51f76543-f559-4735-aa2f-545f930c11cc", "Spark engine used" ]
  }
}

If I add the second part of the filter

(apiproxy eq 'Wholesale-Customers') and (proxy_pathsuffix like '%delivery-windows')

I get a 200 response, but with an empty results section

{
  "environments" : [ {
    "metrics" : [ ],
    "name" : "prod"
  } ],
  "metaData" : {
    "errors" : [ ],
    "notices" : [ "query served by:a469b1a4-e229-4b02-8ee1-f6825f03f376", "Spark engine used" ]
  }
}

Changing "eq" to "like" doesn't change the results.

Not sure if that helps...

Thanks for the update, @Mike Overholt. The eng team is still investigating. I added a note to the ticket referencing this new testing you've done. Thanks for your patience!