*This page
applies to **Apigee** and **Apigee hybrid**.*


This page describes how to configure API insights in API hub to view and analyze API data from your attached gateways. Depending on the type of gateway you want to monitor, you can configure API insights in API hub by either attaching a runtime project or by creating a plugin instance.

> [!NOTE]
> **Note:** When you provision API hub as part of Apigee provisioning, it automatically identifies and attaches any associated Apigee runtime projects. API traffic for such attached projects is collected and analyzed automatically.

## Before you begin

- Grant the required IAM roles and permissions to your principal account. See [IAM roles and permissions](https://docs.cloud.google.com/apigee/docs/apihub/api-insights-overview.md.txt#iam-roles) for more details.
- Ensure that your Apigee organization doesn't have Data Residency (DRZ) enabled. API insights doesn't support creating a plugin instance if Data Residency is enabled for your Apigee organization.

## Configure API insights for Apigee and Apigee hybrid

> [!NOTE]
> **Note:** API insights is supported only for Apigee hybrid versions **1.14.0** and later.


To configure API insights to ingest API data from [Apigee](https://docs.cloud.google.com/apigee/docs/api-platform/get-started/what-apigee.md.txt) and [Apigee hybrid](https://docs.cloud.google.com/apigee/docs/hybrid/v1.15/what-is-hybrid.md.txt) gateways, attach a runtime project to API hub. For more information, see [attach a runtime project](https://docs.cloud.google.com/apigee/docs/apihub/auto-register-apigee-proxies#attach-a-runtime-project).


If you have an existing runtime project attached, but are unable to see any API data in API insights, then you may need to edit the project settings to import the necessary API assets into API hub. For more information, see [Edit project association settings](https://docs.cloud.google.com/apigee/docs/apihub/auto-register-apigee-proxies#edit-project-association-settings).

## Configure API insights for Apigee Edge Public Cloud


To configure API insights to ingest API data from [Apigee Edge Public Cloud](https://docs.apigee.com/api-platform/get-started/get-started) gateway, perform the following steps:

1. Create a plugin instance for your Apigee Edge Public Cloud gateway. For more information, see [create a plugin instance](https://docs.cloud.google.com/apigee/docs/apihub/create-plugin-instances.md.txt).
2. Set up the Apigee Edge API hub connector for your Apigee Edge organization. For more information, see [Apigee Edge API hub connector setup](https://docs.apigee.com/api-platform/integrations/apigee-edge-uapim-prerequisites#apigee-edge-api-hub-connector-setup-opt-in-for-an-organization).

## Configure API insights for Apigee Edge Private Cloud (OPDK)

> [!NOTE]
> **Note:** API insights is supported only for OPDK versions **4.52.02.xx** and **4.53.00.xx**.


To configure API insights to ingest API data from [Apigee Edge Private Cloud (OPDK)](https://docs.apigee.com/private-cloud/versions) gateway, perform the following steps:

1. Create a plugin instance for your Apigee Edge Private Cloud (OPDK) gateway. For more information, see [create a plugin instance](https://docs.cloud.google.com/apigee/docs/apihub/create-plugin-instances.md.txt).
2. Install the Apigee API hub for private cloud connector RPM package on your Apigee OPDK environment. For more information, see [Install Apigee API Hub for Private Cloud connector](https://docs.apigee.com/private-cloud/v4.52.02/privatecloud-install-uapim-connector).
3. Configure the network, authentication, and organization-specific settings for the Apigee API hub for private cloud connector. For more information, see [Configure Apigee API Hub for Private Cloud connector](https://docs.apigee.com/private-cloud/v4.52.02/privatecloud-configure-uapim-connector).
4. Configure the message processor (MP) configuration for the Apigee API hub for private cloud connector. For more information, see [Configure runtime](https://docs.apigee.com/private-cloud/v4.52.02/privatecloud-uapim-configure-runtime).

## Considerations

- Plugin instances recreated using the same plugin instance ID as a previously deleted plugin instance will inherit the insights of the previous plugin instance.
- Creating plugin instances with a [custom curation logic](https://cloud.google.com/apigee/docs/apihub/curations#curation-types) might result in runtime data sync issues. It is recommended to use the default curation logic while creating a plugin instance.
- It is recommended to use unique display names for your APIs. API insights uses the display name of an API to identify the API in the API inventory.
- API insights presents empty API data values as `Not set`.

## What's next

- Learn about [API insights dashboards](https://docs.cloud.google.com/apigee/docs/apihub/api-insights-dashboard.md.txt).
- Learn about [attaching a runtime project](https://docs.cloud.google.com/apigee/docs/apihub/auto-register-apigee-proxies#attach-a-runtime-project) or [creating a plugin instance](https://docs.cloud.google.com/apigee/docs/apihub/create-plugin-instances.md.txt) in API hub.