Search code examples
google-app-enginegoogle-cloud-platformapp-engine-flexiblegoogle-flexible

In App Engine Flexible Environment, how can I see which Version of a Service is the default?


In Google App Engine Flexible Environment, I'd like to see which Version of my Service is the default.

The list operation of the Admin API does not show it:

https://appengine.googleapis.com/v1/apps/myapp/services/myservice/versions

Neither does the get operation:

https://appengine.googleapis.com/v1/apps/myapp/services/myservice.versions/myverson

In the Google App Engine API, I can use

ModulesService modulesService = ModulesServiceFactory.getModulesService();
String currentModuleName = modulesService.getCurrentModule();
String version = modulesService.getDefaultVersion(currentModuleName);

But that is not available in Flexible Environment.

How do I do this in the Admin API?


Solution

  • I believe it is because App Engine has stopped referring to a specific version as the default one.

    App Engine seems to have no way to set a default version of a service since they replaced it with the feature of "Migrate traffic".

    You can use the apps.services.get method to get the current traffic split for a service.