Create custom plugins Stay organized with collections Save and categorize content based on your preferences.
This pageapplies toApigee andApigee hybrid.
This page describes how to create custom plugins in API hub. Custom plugins are created manually to connect API hub to a specific API data source. You can create custom plugins to connect to on-premises or multi-cloud sources, or to adapt API hub to meet specific business needs. For more information about plugins in API hub, seePlugins overview.
Before you begin
- Grant the followingIAM permissions to your principal account:
apihub.plugins.createapihub.plugins.deleteapihub.plugins.getapihub.plugins.list
For information on granting roles to principals, seeGranting, changing, and revoking access.
- If you are creating a custom plugin to connect any Google Cloud services, ensure that you attached the runtime project to API hub. SeeAttach a runtime project.
- For Apigee Edge Public Cloud plugins, read aboutApigee Edge API hub connector integration.
- For Apigee Edge Private Cloud (OPDK) plugins, read aboutAPI hub connector integration.
Create a custom plugin
Console
To create a custom plugin, do the following:
- In the Google Cloud console, go to theAPI hub page.
- ClickSettings from the left navigation menu to open theSettings page.
- Click thePlugins tab to view the available plugins in your project.
- ClickCreate a new plugin.
- Configure the following fields in theCreate plugin pane:
- Display name: Enter a name for the plugin.
- Optional: ClickSpecify ID to provide a unique ID for the plugin. API hub generates a unique ID if you don't provide one.Note: The ID must be between 4 to 500 characters in length and can only contain the following characters:
/[A-Z][a-z][0-9]-/. - Description: Enter a description for the plugin.
- Plugin type: This field is selected by default.
- ClickCreate plugin to create the plugin.
On successful creation, you can see a new plugin card displayed in thePlugins tab. To use the plugin, you need tocreate a plugin instance.
REST
You can create a custom plugin using theCreate Plugin API:
Custom plugin without a hosting service:
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ -d '{ "display_name": "PLUGIN_DISPLAY_NAME", "description": "PLUGIN_DESCRIPTION", "actions_config": [ { "id": "PLUGIN_ACTION_ID", "display_name": "PLUGIN_ACTION_DISPLAY_NAME", "description": "PLUGIN_ACTION_DESCRIPTION", "trigger_mode": "PLUGIN_ACTION_TRIGGER_MODE" } ], "plugin_category": "PLUGIN_CATEGORY", "ownership_type": "USER_OWNED" }' \ "https://apihub.googleapis.com/v1/projects/PROJECT_ID/locations/HUB_LOCATION/plugins?plugin_id=PLUGIN_ID"Example
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ -d '{ "display_name": "Nebula Connect", "description": "Nebula Connect plugin for syncing metadata via gRPC.", "actions_config": [ { "id": "sync-metadata-core", "display_name": "Sync Core Metadata", "description": "Initiates synchronization of core API metadata.", "trigger_mode": "API_HUB_SCHEDULE_TRIGGER" } ], "plugin_category": "API_GATEWAY", "ownership_type": "USER_OWNED" }' \ "https://apihub.googleapis.com/v1/projects/test-project/locations/us-west1/plugins?plugin_id=nebula-connect-v1"Custom plugin with a hosting service:
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ -d '{ "display_name": "PLUGIN_DISPLAY_NAME", "description": "PLUGIN_DESCRIPTION", "actions_config": [ { "id": "PLUGIN_ACTION_ID", "display_name": "PLUGIN_ACTION_DISPLAY_NAME", "description": "PLUGIN_ACTION_DESCRIPTION", "trigger_mode": "PLUGIN_ACTION_TRIGGER_MODE" } ], "plugin_category": "PLUGIN_CATEGORY", "hosting_service": { "service_uri": "PLUGIN_HOSTING_SERVICE_URI" }, "ownership_type": "USER_OWNED" }' \ "https://apihub.googleapis.com/v1/projects/PROJECT_ID/locations/HUB_LOCATION/plugins?plugin_id=PLUGIN_ID"Example
curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ -d '{ "display_name": "Nebula Connect", "description": "Nebula Connect plugin for syncing metadata via gRPC.", "actions_config": [ { "id": "sync-metadata-core", "display_name": "Sync Core Metadata", "description": "Initiates synchronization of core API metadata.", "trigger_mode": "API_HUB_SCHEDULE_TRIGGER" } ], "plugin_category": "API_GATEWAY", "hosting_service": { "service_uri": "[https://nebula-endpoints-987654321098.us-west1.run.app](https://nebula-endpoints-987654321098.us-west1.run.app)" }, "ownership_type": "USER_OWNED" }' \ "https://apihub.googleapis.com/v1/projects/test-project/locations/us-west1/plugins?plugin_id=nebula-connect-v1"Replace the following:
PLUGIN_DISPLAY_NAME: The display name of the plugin.PLUGIN_DESCRIPTION: A description of the plugin.PLUGIN_ACTION_ID: The ID of the plugin action.PLUGIN_ACTION_DISPLAY_NAME: The display name of the plugin action.PLUGIN_ACTION_DESCRIPTION: A description of the plugin action.PLUGIN_ACTION_TRIGGER_MODE: The trigger mode of the plugin action.PLUGIN_CATEGORY: The category of the plugin.PLUGIN_HOSTING_SERVICE_URI: The URI of the hosting service.PROJECT_ID: The name of your API hub host project. The host project was selected when API hub was provisioned.HUB_LOCATION: The location of the API hub.PLUGIN_ID: The ID of the plugin.
What's next
- Learn how toManage custom plugins.
- SeePlugins overview.
- Learn aboutCreating plugin instances.
- Learn aboutManaging plugin instances.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.