Deprovision Apigee API hub Stay organized with collections Save and categorize content based on your preferences.
This pageapplies toApigee andApigee hybrid.
This page describes how to deprovision an API hub instance from your Google Cloud project. Deprovisioning an API hub instance removes all associated resources, including APIs, versions, deployments, and any Apigee organizations (with noApigee instances) from your project.
Note: Deprovisioning an API hub instance doesn't impact or delete any existing Apigee data, such as API proxies or proxy deployments.Before you begin
- Grant theCloud API hub Admin (
roles/apiHub.admin) IAM role on the project. - Grant theCloud API hub Provisioning Admin (
roles/apihub.provisioningAdmin) role on the default service account. - Delete all plugin instances from API hub.
If you are using API hub with Apigee, then you mustdelete all the Apigee instances before you can deprovision API hub.
For more information about granting roles, seeManage access to service accounts, projects, folders, and organizations.
Deprovision an API hub instance
To deprovision an API hub instance, do the following:
Warnings:- Deprovisioning an API hub instance deletes all the data associated with the instance. Any associatedApigee organizations (with noApigee instances) are also deleted. This action can't be undone.
- Once deprovisioned, you can re-provision an API hub instance again. However, you will need to wait7 days before reprovisioning.
Console
- In the Google Cloud console, go to theAPI hub page.
- ClickSettings from the left navigation menu to open theSettings page.
- Click theDeprovision tab.
- ClickDeprovision API hub.
- In the confirmation dialog, enterdeprovision to confirm.
A long-running operation is created to deprovision the API hub instance. You will be redirected to theGet started with API hub page when the deprovisioning is complete.
REST API
- Look up the project ID of the project where the API hub instance is located:
curl --location 'https://apihub.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/apiHubInstances:lookup' \ --header 'Authorization: Bearer $(gcloud auth print-access-token)'
Replace the following:
PROJECT_ID: the project ID of the Google Cloudproject where the API hub instance is provisioned.LOCATION: the location of the API hub instance.
The output is similar to the following:
{ "apiHubInstance": { "name": "projects/PROJECT_ID/locations/LOCATION/apiHubInstances/INSTANCE_ID", "createTime": "2024-05-10T06:22:43.790772Z", "updateTime": "2024-05-10T06:22:44.657220Z", "state": "ACTIVE", "config": { "cmekKeyName": "projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID", "vertexLocation": "VERTEX_LOCATION", "encryptionType": "CMEK" } }}The output contains the project ID, location, instance ID, and the encryption details of the API hub instance.
Note: You can only deprovision an API hub instance if the state of the instance isACTIVE. - Delete the API hub instance:
curl --location --request DELETE 'https://apihub.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/apiHubInstances/INSTANCE_ID' \ --header 'Authorization: Bearer $(gcloud auth print-access-token)'
Replace the following:
PROJECT_ID: the project ID of the Google Cloud project where the API hub instance is provisioned.LOCATION: the location of the API hub instance.INSTANCE_ID: the ID of the API hub instance.
The output is similar to the following:
{ "name": "projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.apihub.v1.OperationMetadata", "createTime": "2025-03-28T07:41:23.020949825Z", "target": "projects/PROJECT_ID/locations/LOCATION/apiHubInstances/INSTANCE_ID", "verb": "delete", "requestedCancellation": false, "apiVersion": "v1" }, "done": false}The API returns a long-running operation ID. You can use the operation ID to check the status of the deletion.
To check the status of the deletion, run the following command:
curl --location 'https://apihub.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID' \ --header 'Authorization: Bearer $(gcloud auth print-access-token)'
Replace the following:
PROJECT_ID: the project ID of the Google Cloud project where the API hub instance is provisioned.LOCATION: the location of the API hub instance.OPERATION_ID: the operation ID returned by the previous command.
The output is similar to the following:
{ "name": "projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.apihub.v1.OperationMetadata", "createTime": "2025-03-28T07:41:23.020949825Z", "endTime": "2025-03-28T07:45:12.648333602Z", "target": "projects/PROJECT_ID/locations/LOCATION/apiHubInstances/INSTANCE_ID", "verb": "delete", "requestedCancellation": false, "apiVersion": "v1" }, "done": true, "response": { "@type": "type.googleapis.com/google.protobuf.Empty" }}The API returns a
donevalue oftruewhen the deletion is complete.
Considerations
- Once deprovisioned, you can re-provision an API hub instance again. However, you will need to wait7 days before reprovisioning.
What's next
- Learn aboutprovisioning an API hub instance.
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 2026-02-19 UTC.