# Looker Studio Integration

> [!WARNING]
> **Preview --- Looker Studio Integration**
>
> This feature is covered by the [Pre-GA Offerings Terms](https://cloud.google.com/terms/service-terms#1)
> of the Google Cloud Terms of Service. Pre-GA features may have limited support, and changes to pre-GA features
> may not be compatible with other pre-GA versions. For more information, see the [launch stage descriptions](https://cloud.google.com/products#product-launch-stages).
>
> Support for the Preview launch of Advanced API Security Abuse Detection is available through
> the [Apigee - Google Cloud Community](https://www.googlecloudcommunity.com/gc/Apigee/bd-p/cloud-apigee) forum.

> [!NOTE]
> **Note:** Looker Studio Integration is currently not supported for organizations with [data residency](https://docs.cloud.google.com/apigee/docs/api-platform/get-started/drz-concepts) enabled.

In addition to viewing Apigee Analytics and monetization data in the Apigee UI,
you can also view them using Looker Studio Integration, which connects Apigee data to Google's
[Looker Studio](https://cloud.google.com/looker-studio). Looker Studio is a powerful and flexible tool that you can use to
display Apigee data in fully customizable dashboards and reports.

> [!NOTE]
> **Note:** If your organization uses [VPC service controls](https://docs.cloud.google.com/apigee/docs/api-platform/security/vpc-sc), you must add [egress and ingress rules](https://cloud.google.com/vpc-service-controls/docs/ingress-egress-rules) for the Looker Studio service account to allow services for the following APIs:
>
> - `bigquery.googleapis.com`
> - `bigquerydatatransfer.googleapis.com`

The following sections explain how to create an Analytics data report in Looker Studio.

## Required role

To use Looker Studio, you first need to connect it to a data source---in this case,
Apigee. To make the connection, you need to have the role
`roles/apigee.analyticsEditor`.

See [Apigee roles](https://cloud.google.com/iam/docs/roles-permissions/apigee)
for more information.

## Connect to the Apigee data source

To connect to the Apigee data source, do the following steps:

1. Open [Looker Studio](https://lookerstudio.google.com). The main Looker Studio page is shown below:


2. Click the **+ Create** button at the top of the page.
3. Select **Data source** to display an untitled **Data Source** page.
4. Scroll down and click the **Apigee** button:


5. Click the **Authorize** button to allow Looker Studio to connect to the Apigee data.
6. In the **Apigee Organization Name** field, enter the organization ID. **Note:** The organization ID is the same as the Google Cloud project ID for the organization.
7. Click **Connect** at the top-right of the window.

   **Note:** You must have the
   role `roles/apigee.analyticsEditor` to perform this step.

   When the connection to Apigee is made, Looker Studio displays the
   page shown below, where you can create a report:


The next section explains how to view an Analytics data report in Looker Studio using the
Apigee API Platform template.

## Use the Apigee API Platform template

The following sections describe how to view a predefined report using the Apigee API
Platform template.

- [Open the Apigee API Platform template
  from Looker Studio](https://docs.cloud.google.com/apigee/docs/api-platform/analytics/looker#open-the-apigee-api-platform-template-from-looker-studio)
- [Open the Apigee API Platform template
  from the Apigee UI](https://docs.cloud.google.com/apigee/docs/api-platform/analytics/looker#open-the-apigee-api-platform-template-from-the-apigee-ui)

### Open the Apigee API Platform template from Looker Studio

To open the Apigee API Platform template from Looker Studio:

1. In the Looker Studio page, select **Templates** in the navigation pane.
2. In the **Category** menu in **Template Gallery** , select **Apigee**.
3. Under **Apigee** , select **Apigee API Analytics** . This displays the **Apigee API
   Platform** template:

4. Click **Use my own data** at the top-right of the page to open the the **Add data to report** dialog.
5. In the **Apigee Organization Name** field, enter the organization ID. **Note:** The organization ID is the same as the Google Cloud project ID for the organization.
6. Click **Add** at the lower right.

### Open the Apigee API Platform template from the Apigee UI

To open the Apigee API Platform template from the Apigee UI:

1. In the Google Cloud console, go to the **Apigee \> Analytics \> Custom Reports** page.

   [Go to Custom Reports](https://console.cloud.google.com/apigee/analytics/custom-reports)
2. Click **Create More Reports Using Looker Studio** at the top-right. This displays the **Apigee API Platform** template:

3. Click **Use my own data** at the top-right of the page to open the the **Add data to report** dialog.
4. In the **Apigee Organization Name** field, enter the organization ID. **Note:** The organization ID is the same as the Google Cloud project ID for the organization.
5. Click **Add** at the lower right.

> [!NOTE]
> **Note:** In the **Developer Adoption** chart, the number below **Application** is the number of active applications within the selected date range, shown at the top right of the template. This differs from the total number of applications (shown, for example, in the **Traffic growth** chart above), which includes inactive applications.

You can view a number of different charts in the report, including:

- API product growth
- Traffic growth
- Latency performance
- Error code improvements

See the Looker Studio
[Quick start guide](https://support.google.com/looker-studio/answer/9171315#zippy=%2Cinstructions) to learn more.

## Create an Analytics data report

You can also create an Analytics data report directly in Looker Studio, without using
the [Apigee API Platform template](https://docs.cloud.google.com/apigee/docs/api-platform/analytics/looker#apigee-api-analytics-template):

1. In the Looker Studio page, click **+ Create**.
2. Select **Report**.
3. Under **Add data to report** , select **My data sources**.
4. Select **Apigee - Analytics**.
5. Click **Add** at the lower right.
6. In the confirmation dialog, click **Add to Report** . This displays the Report page with Apigee Analytics data available to add to the report, as shown below:


You can now create an Analytics report. Here's an example that creates a graph of API
traffic over time:

1. Select the **Insert** menu at the top of the Report page.
2. Select **Time series chart**.
3. In the **Metric** pane on the right side of the Report page, select **+ Add metric**.
4. Scroll down through the **Available Fields** and select **Traffic**.

This displays a time series chart of recent traffic. An example is shown below. (Your data will
vary.)


If you want to view a different time range for the data, return to the **Insert** menu and
select **Date range control**. You can then use the control to select
a time range for the data to display.

The Looker Studio documentation describes how to create many kinds of reports. For more
information, see the following:

- [Looker Studio Quick start guide](https://support.google.com/looker-studio/answer/9171315#zippy=%2Cinstructions)
- [Explore new ways to visualize your data](https://lookerstudio.google.com/visualization)