{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • General
    • Business of APIs
    • API Design
    • Academy/Certification
    • Analytics
    • Apigee Test - beta
    • Apigee-127
    • BaaS/Usergrid
    • Developer Portal
    • Edge/API Management
    • Events
    • Insights
    • Integration (AWS, PCF, Etc.)
    • IoT - Apigee Link
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Analytics /
avatar image
0
Question by Mike Overholt · Apr 12, 2017 at 08:41 PM · 83 Views analyticsfiltering

Compound Filters with Analytics API

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.

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

· Add your answer
  • Sort: 
avatar image
0

Answer by Floyd Jones · Apr 13, 2017 at 05:08 PM

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)

Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mike Overholt · Apr 20, 2017 at 05:30 PM 0
Link
@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...

avatar image Floyd Jones ♦♦ Mike Overholt · Apr 21, 2017 at 12:18 AM 0
Link

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!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 5 attachments (including images) can be used with a maximum of 5.0 MB each and 25.0 MB total.

Follow this Question

Answers Answers and Comments

35 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is there a way to get the custom report for a specific user? 1 Answer

issues with analytics filters 1 Answer

analytics filter - invalid API call 4 Answers

Wildcard characters % in Custom Report Filter 1 Answer

Unable to get request_uri with management API through htp request => "Unable to resolve request request_uri", is it possible to do it ? 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2018 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • General
  • Business of APIs
  • API Design
  • Academy/Certification
  • Analytics
  • Apigee Test - beta
  • Apigee-127
  • BaaS/Usergrid
  • Developer Portal
  • Edge/API Management
  • Events
  • Insights
  • Integration (AWS, PCF, Etc.)
  • IoT - Apigee Link
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Members
  • Badges