Deleting an API and API Instances

This page shows how to delete an API and the App Engine, Compute Engine, or GKE instance that the API runs on. Deleting an API removes it from the APIs list for your project in the Google Cloud Platform Console, and stops all services performed for that API, for example, API key checks.

Because deleting the API doesn't stop the instances running the API, you must also delete the instances used to run the API.

Deleting an API

To delete an API:

  1. Obtain the name of the API you want to delete. If you are unsure of the name, invoke the following command to list the APIs managed in your project:

    gcloud endpoints services list
  2. Delete the API using the following command:

    gcloud endpoints services delete SERVICE

    Replace SERVICE with the name of your API.

For more information about the above commands, see gcloud endpoints services list and gcloud endpoints services delete.

Deleting API instances

Deleting an API does not delete the instances it was running on: if you want to delete the instances that are running your API, you need to delete them as well.

Compute Engine

Use the gcloud compute instances delete command. When you delete an instance in this way, the instance shuts down and is removed from the list of instances, and all resources attached to the instance are released, such as persistent disks and any static IP addresses.

To delete an instance, use the following command:

gcloud compute instances delete example-instance [example-instance-2 example-instance-3..]

For more information on deleting Compute Engine instances, see the Compute Engine documentation.


To delete a container cluster with the gcloud command-line tool:

gcloud container clusters delete NAME --zone ZONE

Replace NAME with the name of your cluster and ZONE with the compute zone that the cluster is in.

For more information on deleting a GKE cluster, see the GKE documentation.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Endpoints with gRPC
Need help? Visit our support page.