The Google Play Developer Publishing API Edits methods allow you to prepare a number of changes to your Google Play app, then deploy them all at once. You do this by creating an edit, which holds all the changes you want to make to the app. The edit holds such information as:
Which APKs are associated with the app, and a "track" for each APK.
Each is associated with a "track", determining which users see it. This allows you to provide alpha and beta versions of the app for your testers. In addition, you can provide a limited-release "staged rollout" version of the app; this app is automatically served to a limited number of the app's users (determined by the rollout percentage you set), allowing you to deploy a new production version of the app gradually.
Language and locale-specific versions of the app's Google Play Store listing
Each locale-specific version of the store listing can contain screenshots and other promotional graphics, localized descriptive text, and so on.
When you first create an edit, the edit is a copy of the current deployed state of the app. You can then modify the edit by calling the Edits methods. When the edit is ready to go, you commit it, making the changes live. You can also abandon the edit at any time, discarding the changes and leaving your app as it was.
You can only use this API to make changes to an existing app (that has at least one APK uploaded); thus, you will have to upload at least one APK through the Play Console before you can use this API. Furthermore, you cannot use this API to change an app's state from "published" to "unpublished", or to fill out the legal consents required for publishing. To publish the app, you have to use the Play Console.
Workflow
This section shows the typical way you would use the Google Play Developer Publishing API Edits methods to make modifications to an app.
Create a new edit, by calling Edits: Insert and specifying the app you want to modify.
This creates a new edit of the specified app. The app's initial settings--the APKs, store listings, expansion files, and so on--are all copied from the deployed version of the app.
Modify the edit as desired.
You can make most of the changes which could be made through the Google Play Console. You do this by calling the appropriate Google Play Developer API method, and passing the IDs of the app and edit you want to modify. Specifically:
- You can upload new APKs by calling Edits.apks: upload. This puts the APK in a storage area, so it can be assigned to a track in this or a subsequent edit.
- You can assign APKs to tracks by calling Edits.tracks: update. You can also change the track assignments for existing APKs by calling Edits.tracks: patch.
- You can create a new localized store listing by calling Edits.listings: update. You can modify an existing store listing by calling Edits.listings: patch.
- You can add or modify expansion files by calling the Edits.expansionfiles resource methods.
These methods make changes to the edit you have in progress, but they do not modify the live version of the app. You can make further changes or discard the edit in progress without affecting the user experience.
Commit the edit.
When you call Edits: commit, if there are no validation errors, then all the changes specified in the edits resource go "live", replacing the current state of the app. These changes can take several hours to take effect, just as when you make changes through the Play Console.