Stay organized with collections
Save and categorize content based on your preferences.
This page
applies to Apigee and Apigee 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 no Apigee instances) from your project.
Before you begin
Grant the Cloud API hub Admin (roles/apiHub.admin) IAM role on the project.
Grant the Cloud API hub Provisioning Admin (roles/apihub.provisioningAdmin) role on the default service account.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-02 UTC."],[],[],null,["*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\nThis 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 no [Apigee instances](https://cloud.google.com/apigee/docs/api-platform/system-administration/instances)) from your project.\n| **Note:** Deprovisioning an API hub instance doesn't impact or delete any existing Apigee data, such as API proxies or proxy deployments.\n\nBefore you begin\n\n- Grant the **Cloud API hub Admin** (`roles/apiHub.admin`) IAM role on the project.\n- Grant the **Cloud API hub Provisioning Admin** (`roles/apihub.provisioningAdmin`) role on the default service account.\n- For more information about granting roles, see [Manage access to service accounts, projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n- [Delete all plugin instances from API hub.](/apigee/docs/apihub/manage-plugin-instances#delete-plugin-instance)\n-\n If you are using API hub with Apigee, then you must [delete all the Apigee instances](/apigee/docs/api-platform/system-administration/instances#delete-instance) before you can deprovision API hub.\n\nDeprovision an API hub instance\n\n\nTo deprovision an API hub instance, do the following:\n| **Warnings:**\n|\n| - Deprovisioning an API hub instance deletes all the data associated with the instance. Any associated **Apigee organizations** (with no [Apigee instances](https://cloud.google.com/apigee/docs/api-platform/system-administration/instances)) are also deleted. This action can't be undone.\n| - Once deprovisioned, you can re-provision an API hub instance again. However, you will need to wait **7 days** before reprovisioning.\n\nConsole\n\n1. In the Google Cloud console, go to the **API hub** page.\n\n [Go to API hub](https://console.cloud.google.com/apigee/api-hub)\n2. Click settings **Settings** from the left navigation menu to open the **Settings** page.\n3. Click the **Actions** tab and go to the **Deprovision API hub** section.\n4. Click **Deprovision**.\n5. In the confirmation dialog, enter **deprovision** to confirm.\n\n\n A long-running operation is created to deprovision the API hub instance. You will be redirected to the **Get started with API hub** page when the deprovisioning is complete.\n\nREST API\n\n1. Look up the project ID of the project where the API hub instance is located:\n\n ```\n curl --location \n 'https://apihub.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/apiHubInstances:lookup' \\\n --header 'Authorization: Bearer $(gcloud auth print-access-token)'\n ```\n\n \u003cbr /\u003e\n\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID of the Google Cloudproject where the API hub instance is provisioned.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location of the API hub instance.\n\n\n The output is similar to the following: \n\n ```\n {\n \"apiHubInstance\": {\n \"name\": \"projects/PROJECT_ID/locations/LOCATION/apiHubInstances/INSTANCE_ID\",\n \"createTime\": \"2024-05-10T06:22:43.790772Z\",\n \"updateTime\": \"2024-05-10T06:22:44.657220Z\",\n \"state\": \"ACTIVE\",\n \"config\": {\n \"cmekKeyName\": \"projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID\",\n \"vertexLocation\": \"VERTEX_LOCATION\",\n \"encryptionType\": \"CMEK\"\n }\n }\n }\n ```\n\n\n The output contains the project ID, location, instance ID, and the encryption details of the API hub instance.\n | **Note:** You can only deprovision an API hub instance if the state of the instance is `ACTIVE`.\n2. Delete the API hub instance:\n\n ```\n curl --location --request DELETE \n 'https://apihub.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/apiHubInstances/INSTANCE_ID' \\\n --header 'Authorization: Bearer $(gcloud auth print-access-token)'\n ```\n\n \u003cbr /\u003e\n\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID of the Google Cloud project where the API hub instance is provisioned.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location of the API hub instance.\n - \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e: the ID of the API hub instance.\n\n\n The output is similar to the following: \n\n ```\n {\n \"name\": \"projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.apihub.v1.OperationMetadata\",\n \"createTime\": \"2025-03-28T07:41:23.020949825Z\",\n \"target\": \"projects/PROJECT_ID/locations/LOCATION/apiHubInstances/INSTANCE_ID\",\n \"verb\": \"delete\",\n \"requestedCancellation\": false,\n \"apiVersion\": \"v1\"\n },\n \"done\": false\n }\n ```\n\n\n The API returns a long-running operation ID. You can use the operation ID to check the status of the deletion.\n\n\n To check the status of the deletion, run the following command: \n\n ```\n curl --location \n 'https://apihub.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID' \\\n --header 'Authorization: Bearer $(gcloud auth print-access-token)'\n ```\n\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID of the Google Cloud project where the API hub instance is provisioned.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location of the API hub instance.\n - \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: the operation ID returned by the previous command.\n\n\n The output is similar to the following: \n\n ```\n {\n \"name\": \"projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.apihub.v1.OperationMetadata\",\n \"createTime\": \"2025-03-28T07:41:23.020949825Z\",\n \"endTime\": \"2025-03-28T07:45:12.648333602Z\",\n \"target\": \"projects/PROJECT_ID/locations/LOCATION/apiHubInstances/INSTANCE_ID\",\n \"verb\": \"delete\",\n \"requestedCancellation\": false,\n \"apiVersion\": \"v1\"\n },\n \"done\": true,\n \"response\": {\n \"@type\": \"type.googleapis.com/google.protobuf.Empty\"\n }\n }\n ```\n\n\n The API returns a `done` value of `true` when the deletion is complete.\n\nConsiderations\n\n- Once deprovisioned, you can re-provision an API hub instance again. However, you will need to wait **7 days** before reprovisioning.\n\nWhat's next\n\n- Learn about [provisioning an API hub instance](/apigee/docs/apihub/provision)."]]