Hello everyone.
I'm trying to make a custom report for proxy.
For example I have a proxy with base path ".../v1/accounts"
and multiple endpoints like:
"/v1/accounts/{user_id}/balance"
"/v1/accounts/{user_id}/cards"
"/v1/accounts/{user_id}/some_other_stuff"
I'm trying to create a report which will combine requests to balance, cards, and other endpoints.
For example I would like to see in report that:
500 calls made to /balance endpoint, 150 calls to /cards endpoint.
Issue is that when I'm trying to make this report I have dynamic {user_id} parameter. And apigee shows me request for each endpoint like:
1 call to endpoint "/v1/accounts/user_1/cards", 1 call to endpoint "/v1/accounts/user_2/cards", etc.
Does not work with pathSuffix, it takes each request with to unique user_id as independent suffix.
Is it possible to generate report for url pattern, for example.
First dimension(proxy):Proxy 1.
Second dimension request URL but grouping all calls to URL pattern ignoring user_id:
"/v1/accounts/.*./cards", "/v1/accounts/.*,/balance".
Or to get sum of request on url which ends with "cards" or something like this?
For example I have a proxy with ...multiple endpoints like:
By "endpoints" I'm inferring that you mean "Flows". Is that right?
I think you'd want to use a StatisticsCollector, and have your proxy set a variable that defines the "clump" or "group" of calls. One option is recording the variable "current.flow.name" for the custom dimension.
There is already a clump in the dimensions - "Flow resource". This is populated, I believe, by the variable "flow.resource.name". If you set THAT variable (see this Q&A for how and why), then you could use that as the clump. It also helps with VerifyApiKey or VerifyAccessToken.
Does that cover what you need?
User | Count |
---|---|
5 | |
2 | |
2 | |
1 | |
1 |