To add to the accepted answer, if your API is written in Java and you use Maven, you can automatically generate a version of the API by adding it to your configuration for appengine-maven-plugin . When deployed, the version number will be automatically updated, and the deployed version will be installed as the only current working version of your API:
<plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>appengine-maven-plugin</artifactId> <version>${appengine.maven.plugin.version}</version> <configuration> <deploy.projectId>my-gcp-project-name</deploy.projectId> <deploy.version>GCLOUD_CONFIG</deploy.version> </configuration> </plugin>
The corresponding line is <deploy.version>GCLOUD_CONFIG</deploy.version> ( GCLOUD_CONFIG is the actual value you need - it is recognized as a special variable when deployed)
source share