Obter o nome do serviço e o ID da configuração

Para implementar o seu documento OpenAPI, execute o comando gcloud endpoints services deploy. Na primeira vez que implementa o seu documento OpenAPI, o comando gcloud chama uma API Service Management para criar um serviço gerido através do nome especificado no campo host do seu documento OpenAPI. A gestão de serviços atribui automaticamente um ID de configuração, que consiste numa indicação de data/hora seguida de um número de revisão. Por exemplo: 2017-02-13r0

Se implementar novamente a configuração do serviço no mesmo dia, a gestão de serviços incrementa o número de revisão no ID de configuração. Se implementar novamente a configuração do serviço noutro dia, o Service Management atribui uma nova data/hora ao ID de configuração e repõe o número de revisão para 0.

O Endpoints usa a gestão de serviços para armazenar configurações de serviços. A gestão de serviços armazena apenas as 100 configurações de serviços mais recentes.

Esta página descreve como ver o nome do seu serviço e os IDs de configuração.

Google Cloud console

  1. In the Google Cloud console, go to the Endpoints > Services page for your project.

    Go to the Endpoints Services page

  2. If you have more than one API, select an API from the list.
  3. Click the Deployment history tab.
  4. 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

  1. Enter the following to display the project IDs for your Google Cloud projects:
    gcloud projects list
  2. 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
  3. Get a list of services in your project:
    gcloud endpoints services list
  4. 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.

O que se segue?