Stay organized with collections
Save and categorize content based on your preferences.
Cloud Endpoints uses Service Management to manage your API. When
you deployed your OpenAPI document by using the gcloud endpoints services
deploy command, the command used Service Management to create a
managed service for your API.
If you deleted a managed service by using the gcloud endpoints services delete
command, Service Management doesn't immediately delete the managed
service. Service Management disables the managed service for 30 days,
which allows you time to restore it if you need to. After 30 days,
Service Management permanently deletes the managed service.
While the managed service is in the disabled state, Service Management
doesn't allow the creation of another managed service with the same name.
To restore a managed service:
Make sure that the Google Cloud CLI (gcloud) is authorized to access your data
and services on Google Cloud:
gcloudauthlogin
Restore the managed service and assign it to the
Google Cloud project that it was originally created in. Replace
[SERVICE_NAME] with the name of your managed service.
gcloudendpointsservicesundelete[SERVICE_NAME]
Troubleshooting
If the gcloud endpoints services undelete command fails with a permission
error similar to:
ERROR: (gcloud.endpoints.services.undelete) User [EMAIL] does not have permission to access service
Run gcloud auth login and make sure to choose a user account that has
permission to access the project that the managed service is in.
Make sure you have been granted the Service Management Administrator IAM role
(roles/servicemanagement.admin).
[[["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-08-07 UTC."],[[["\u003cp\u003eCloud Endpoints utilizes Service Management to oversee APIs, creating a managed service upon deployment via the \u003ccode\u003egcloud endpoints services deploy\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eDeleting a managed service with \u003ccode\u003egcloud endpoints services delete\u003c/code\u003e only disables it for 30 days, allowing for potential restoration before permanent deletion.\u003c/p\u003e\n"],["\u003cp\u003eDuring the 30-day disabled period, Service Management prevents the creation of another managed service with the same name.\u003c/p\u003e\n"],["\u003cp\u003eManaged services can be restored during this period using the \u003ccode\u003egcloud endpoints services undelete [SERVICE_NAME]\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eIf the undelete command fails due to permission issues, ensure you've logged in with an account that has the required permissions and has the Service Management Administrator role.\u003c/p\u003e\n"]]],[],null,[]]