Note: This article refers to Apigee X and Hybrid.
As an Apigee user, you already have access to pre-built analytics dashboards in the Apigee UI console to monitor API proxy performance, error code analysis, latency analysis, cache performance, and target performance. You can also build custom reports to pull in metrics like proxy errors and traffic.
But let’s say you want to visualize real-time API latency across your entire API ecosystem, identify trends across APIs, or compare traffic data. You might want to create a report for that data and share it with team members who don’t have Apigee access. That’s where Looker Studio, Google Cloud’s free business intelligence platform, comes in.
By default, Apigee users have access to the Apigee data connector in Looker Studio to easily connect your API data, with no export required. Connecting Apigee analytics data to Looker Studio provides near-real time API data visualization and analysis, and the ability to easily build and share custom reports and dashboards for your Apigee API and monetization data.
Looker Studio is free to use for all Google Cloud customers. The Apigee data connector and pre-built Apigee templates in Looker Studio are also free for Apigee customers (If you need advanced features like personal report links and team workspaces, you can upgrade to Looker Studio Pro).
To use the Apigee data connector, you need to have the apigee.analytics.editor role, or have the apigee.reports.create permission.
We’ve created a report template for Apigee data analysis to make it easy to get started in Looker Studio. You can access this template right from the Apigee UI (or in Looker Studio’s template library).
In the Apigee UI, navigate to Analytics > Custom Reports. Select the option at the top right to Create more reports using Looker Studio.
You’ll be taken into the Looker Studio UI, where you’ll see a sample report that Looker Studio generates for you, shown below. This report just shows sample data, so next, you’ll want to click the Use my own data button and enter your Apigee organization name (which is the same as your Google Cloud project name) to populate this report with your Apigee organization data.
You can also edit the fields in this report and further customize it by clicking on the Edit and share button:
Apigee Monetization customers can also access a pre-built template for monetization data in Looker Studio’s template library.
One major benefit of using Looker Studio is that it enables you to view API data at an organization level, and aggregate and compare metrics across your Apigee organizations and your broader API ecosystem (through Looker Studio’s partner connectors). Let’s walk through an example of creating a report to compare monthly API traffic data across two organizations.
In this section, you will:
1. Create a new report in Looker Studio by clicking +Create, then Report.
2. If asked, select Standard as report type.
3. When the new report opens, you will be prompted to create a new data source.
4. Select the Apigee data source, then click on it.
Enter the organization ID (same as the Google Cloud project name).
5. Click Add.
6. By default, you will have a table with a dimension and a metric defined. If needed, with a simple Drag-and-drop from Data panel, define Organization as Dimension, and Traffic as Metric
1. In the report view in Looker Studio, click +Add data to add a new data source.
2. Select the Apigee data source, then click on it.
Enter the second organization ID (same as the Google Cloud project name).
3. Click Add.
As we used the same Looker Connector (Apigee), by default the two data sources have the same name. We will now rename them to make future tasks easier.
4. From the Resource menu, select Manage added data sources. You can see 2 lines corresponding to the 2 added Apigee organizations. For each Apigee organization:
a. Click on Edit.
b. On the left, click on Edit connection to find the Apigee organization name.
c. Click Fields to go back.
d. Then change the name and click on Done.
1. In the Data panel, you could find the two Apigee organizations renamed. You will create a new field for each of them. To view monthly traffic broken out by year, we’ll concatenate (link) that data together from the date field. For each organization:
a. At the end of the fields list, click Add a Field, then Add calculated field.
b. The easiest way to create the new field formula is to use Gemini: enter the prompt concat year and month from date, and Gemini will create the right SQL query to pull this data from your source (CONCAT(CAST(YEAR(Date) AS TEXT), '-', CAST(MONTH(Date) AS TEXT))). You can give this custom field name a title, like “year-month.”
c. Copy the SQL query and repeat these steps for your second Apigee organization. You could paste the SQL.
1. From the menu bar, click on Blend then Add a blend.
2. Click on Join table to add your second Apigee organization.
3. In Table 1’s Available Fields section, search for the custom “year-month” field that we added in Step 2 above, and add it as a dimension. You should have 2 dimensions: “Organization” and “year-month”.
4. Now search for “Traffic” and add that as a metric.
5. Repeat the same steps for Table 2.
6. Click Configure join and select Full outer join. “Join Conditions” should contain only the 2 dimensions “Organization” and “year-month”.
7. Save and close the data blend.
Note: You can blend data for up to 5 organizations.
In this step, you’ll update your chart to show the blended data from the steps above.
1. Click on the table chart, and select Blended Data in the Data source field.
2. Click on Traffic [Table 1] in the Metrics field and give it a name so that you can distinguish this traffic data from your other organization’s traffic data. In this case, we’ll use “Traffic Apigee 5.”
3. Now click on Add Metric and search for Traffic [Table 2] and give this a different name, like “Traffic Apigee 3.”
4. Now we want to display traffic data for each organization in the chart. To do this, click on the Organization field under Dimension and click Add calculated Field. Give the field a name, like “year-month.”
5. Add in the following formula to add data from both organizations: “COALESCE (year-month (Table 1), year-month (Table 2))”. (The fields will auto-populate as you type them).
6. Click on Add a Control in the report menu item, and select Date range control to add this to your chart. Now you’ll be able to customize the date range for which data is displayed in your chart.
You have created your first multi-Apigee organization report!
You can now customize your chart formats and their style. For example, you can create a bar chart for better visualization of traffic data over time, a gauge to monitor the entitlement consumption, or your top ten proxies, like the report shown below:
Note: You can add up to 5 organizations for blended traffic
With Looker Studio, you can share reports with team members in your organization, even if they don’t have Apigee access. Clicking the Share button gives you the option to do things like download the report, schedule regular delivery of the report to key stakeholders; and embed the report in another context.
Reports are auto-refreshed, so that the data always stays current.
If you’re looking to do more in-depth analysis of your API data—and especially if you want to do this across multiple Apigee organizations—Looker Studio is a great option. Because it’s a Google Cloud product, it integrates natively with Apigee, so you don’t have to pay to regularly export the data to BigQuery and/or to a third-party BI system.
It’s also free to use, and the Looker Studio free product includes all of the features outlined in this article.
For more information on this integration, check out our documentation.