Immediately delete an Apigee or Apigee hybrid organization

This page applies to Apigee and Apigee hybrid.

This document outlines the steps to immediately delete an Apigee or Apigee hybrid organization without a soft-deletion data retention period.

You can perform an immediate deletion of an Apigee or Apigee hybrid organization by calling the Apigee API organizations.delete method and setting the retention query parameter to NO_RETENTION.

Instructions

Follow these steps to start and track the immediate deletion of an Apigee or Apigee hybrid organization.

  1. Issue the immediate delete request by calling the organizations.delete API with the retention=NO_RETENTION query parameter:

    curl -X DELETE -H "Authorization: Bearer $(gcloud auth print-access-token)" \
      'https://apigee.googleapis.com/v1/organizations/ORG_NAME?retention=NO_RETENTION'
    

    Where ORG_NAME is the name of the Apigee organization that you want to delete.

    When the immediate deletion request starts successfully, the command returns a long-running operation similar to the following output:

    {
      "name": "organizations/shreypaidapgx/operations/29b3280b-4287-46dc-8a08-069daf9f9bd4",
      "metadata": {
        "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata",
        "operationType": "DELETE",
        "targetResourceName": "organizations/shreypaidapgx",
        "state": "IN_PROGRESS"
      }
    }
  2. Track the status of the delete operation using the operation ID returned in the output of the previous command. The deletion is expected to take at most 2 hours.

    In the following commands, replace ORG_NAME with the name of your Apigee organization and OPERATION_ID with the operation ID from the previous step (for example, 29b3280b-4287-46dc-8a08-069daf9f9bd4).

    • While the deletion is in progress, polling the operation returns a state of IN_PROGRESS:

      curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \
        'https://apigee.googleapis.com/v1/organizations/ORG_NAME/operations/OPERATION_ID'
      
      {
        "name": "organizations/shreypaidapgx/operations/29b3280b-4287-46dc-8a08-069daf9f9bd4",
        "metadata": {
          "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata",
          "operationType": "DELETE",
          "targetResourceName": "organizations/shreypaidapgx",
          "state": "IN_PROGRESS"
        }
      }
    • When the deletion is completed, polling the operation returns a state of FINISHED and "done": true:

      curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \
        'https://apigee.googleapis.com/v1/organizations/ORG_NAME/operations/OPERATION_ID'
      
      {
        "name": "organizations/shreypaidapgx/operations/29b3280b-4287-46dc-8a08-069daf9f9bd4",
        "metadata": {
          "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata",
          "operationType": "DELETE",
          "targetResourceName": "organizations/shreypaidapgx",
          "state": "FINISHED"
        },
        "done": true,
        "response": {
          "@type": "type.googleapis.com/google.protobuf.Empty"
        }
      }

Troubleshooting immediate delete

If the operation state stays IN_PROGRESS for more than 2 hours, contact Google Cloud Support for investigation.