Para implementar tu documento de OpenAPI, ejecuta el comando
gcloud endpoints services deploy. La primera vez que despliegues tu documento de OpenAPI, el comando gcloud llamará a una API de Service Management para crear un servicio gestionado con el nombre que hayas especificado en el campo host de tu documento de OpenAPI.
Gestión de servicios asigna automáticamente un ID de configuración, que consta de una marca de fecha seguida de un número de revisión. Por ejemplo:
2017-02-13r0
Si vuelves a desplegar la configuración de tu servicio el mismo día, Service Management incrementará el número de revisión en el ID de configuración. Si vuelves a implementar la configuración de tu servicio otro día, Service Management asignará una nueva marca de fecha al ID de configuración y restablecerá el número de revisión a 0.
Endpoints usa Service Management para almacenar configuraciones de servicios. Service Management solo almacena las 100 configuraciones de servicio más recientes.
En esta página se describe cómo ver el nombre de tu servicio y los IDs de configuración.
Google Cloud console
- In the Google Cloud console, go to the Endpoints > Services page for your project.
- If you have more than one API, select an API from the list.
- Click the Deployment history tab.
The service name is displayed between the API name and the tabs, near the top-left side of the page. In the Service configuration deployments list, the configuration ID is displayed along with the date and the email address of the principal who deployed the configuration. The Service configuration deployments list displays the latest 100 configuration deployments. The most recent configuration is displayed at the top of the list.
gcloud
- Enter the following to display the project IDs for your
Google Cloud projects:
gcloud projects list
- Using the applicable project ID from the previous step, set the default
project to the one that your API is in:
gcloud config set project YOUR_PROJECT_ID
- Get a list of services in your project:
gcloud endpoints services list
- Using the applicable service name from the previous step, get a list of
configuration IDs for the service:
gcloud endpoints configs list --service=YOUR_SERVICE_NAME
For more information on the preceding commands, see the gcloud reference.
Siguientes pasos
- Consulta cómo desplegar un documento de OpenAPI.
- Consulta información sobre la API Service Management.