Deprovision Apigee API hub

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

Deprovision an API hub instance

To deprovision an API hub instance, do the following:

Warnings:

Console

  1. In the Google Cloud console, go to theAPI hub page.

    Go to API hub

  2. ClickSettings from the left navigation menu to open theSettings page.
  3. Click theDeprovision tab.
  4. ClickDeprovision API hub.
  5. 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

  1. 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.
  2. 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 adone value oftrue when the deletion is complete.

Considerations

What's next

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.