Hi Community,
Currently I am working on getting API proxy traffic volume by Year, Month, and day. I can get year and Month wise date for 365 days using custom report job but I am facing issue while getting it for day, like traffic on 1st, 2nd,3rd, day of Month.
Is there any way to get these details.
PS. I can get these details by calling management API's but looking for solution which can be more visible and can be used by clients.
Hi @DhanshriI ,
To obtain daily API proxy traffic volume data for a specific month using Apigee, you can leverage the "trafficByApiSummarizer.js " script available on GitHub. This tool allows you to generate reports that summarize traffic data by day, which can be more user-friendly for clients compared to direct API calls.
Steps to Get Daily Traffic Data :
Clone the Repository: First, you need to clone the repository that contains the "trafficByApiSummarizer.js script"
git clone https://github.com/DinoChiesa/ApigeeEdge-API-Traffic-Summarizer.git
cd ApigeeEdge-API-Traffic-Summarizer
Run the Script: Use the following command to generate a CSV file that summarizes the traffic volume data by day for a specific month. Replace my-org-name with your organization name and specify the month in the --start parameter.
node ./trafficByApiSummarizer.js -n -o my-org-name --daily --start 20230701 --through_eom
This command will collect daily data starting from July 1, 2023, through the end of the month. Output Options: You can also modify the command to create a Google Sheet instead of a CSV file by adding the -S option.
node ./trafficByApiSummarizer.js -n -o my-org-name --daily --start 20230701 --through_eom -S
Additional Considerations
API Management: If you encounter limitations with custom reports in the Apigee UI, it may be due to the UI's restriction to a two-week period for generating reports. In such cases, using the script as described allows for more flexibility in data range selection.
Data Volume: Be aware that collecting data for extensive periods may take longer, especially if your organization processes a high volume of traffic. Using the verbose option -v can help you monitor the progress of the data collection.
By following these steps, you can efficiently gather daily traffic volume data for your API proxies in a format that is accessible for client use.
Source:
https://github.com/DinoChiesa/ApigeeEdge-API-Traffic-Summarizer
https://docs.apigee.com/api-platform/analytics/analytics-reference
https://cloud.google.com/apigee/specsheets/ApigeeEdgeCloud_volume_SpecSheet.pdf
Best,