Deprovision Apigee API hub

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 from your project.

Before you begin

Deprovision an API hub instance

To deprovision an API hub instance, do the following:

Console

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

    Go to API hub

  2. Click Settings from the left navigation menu to open the Settings page.
  3. Click the Actions tab and go to the Deprovision API hub section.
  4. Click Deprovision.
  5. In the confirmation dialog, enter deprovision to confirm.

    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.

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.

  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 a done value of true when the deletion is complete.

What's next