I am calling this API and am wondering if I can filter the by request_path like 'v1/resource/%'
v1/o/epsilon/environments/prod/stats/request_path?select=count(request_uri)&timeRange=4/15/2015 13:40~4/16/2015 14:40&timeUnit=hour
I am getting this error am not sure where to go to find the possible filters allowed for this API.
Invalid filter expression (request_path LIKE 'v1/resource/%')
Thanks
Solved! Go to Solution.
I have tried with filter (apiproxy like 'ap%') and it worked for me. There was no error like invalid filter expression. Note that content inside single quote behaves like a string.
Following doc link has details on the filter:
http://apigee.com/docs/analytics-services/reference/analytics-reference
Hello Ajay,
I think the main issue here is that analytics API is not exactly SQL and uppercase vs lowercase actually makes a difference. You are using "LIKE" and the API is expecting "like" instead.
I just tried:
o/{org}/environments/{env}/stats/request_path?select=count(request_uri)&timeRange=4/15/2015 13:40~4/16/2015 14:40&timeUnit=hour&filter=(request_path+like+'/v1%')
and it worked fine for me.
I hope this helps.
Hi @Ajay.Goel I do not think you can use Like in the filters. Have you gone through this article ? These gives a pretty exhaustive list of different examples which you can use.
I have tried with filter (apiproxy like 'ap%') and it worked for me. There was no error like invalid filter expression. Note that content inside single quote behaves like a string.
Following doc link has details on the filter:
http://apigee.com/docs/analytics-services/reference/analytics-reference
Thanks @rdoda
I am passing this but it keeps coming back with "Invalid filter expression (apiproxy LIKE 'm%')",
select=count(request_uri)&timeRange=4/15/2015 13:40~4/16/2015 14:40&timeUnit=day&filter=(apiproxy LIKE 'm%')
@api.management.admin? Any insight?
Thanks
Hello Ajay, Could you post this as a separate question? It is good enough to stand on its own.
Hello Ajay,
I think the main issue here is that analytics API is not exactly SQL and uppercase vs lowercase actually makes a difference. You are using "LIKE" and the API is expecting "like" instead.
I just tried:
o/{org}/environments/{env}/stats/request_path?select=count(request_uri)&timeRange=4/15/2015 13:40~4/16/2015 14:40&timeUnit=hour&filter=(request_path+like+'/v1%')
and it worked fine for me.
I hope this helps.
Hey thank you soooo much! This worked!
Though it's possible to add filter expression directly (apiproxy like 'ap%'); in case of facing issue, you can use "filter condition" option (as part of the Filters) which helps you to make a valid filter expression.
try this:
filter = (apiproxy+like+'m%26')