Method: apprecovery.create
创建恢复操作为“草稿”的应用恢复操作。请注意,此操作不会执行恢复操作。
HTTP 请求
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/appRecoveries
网址采用 gRPC 转码语法。
路径参数
参数 |
packageName |
string
必需。对其执行恢复操作的应用的软件包名称。
|
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"targeting": {
object (Targeting )
},
// Union field recovery_action can be only one of the following:
"remoteInAppUpdate": {
object (RemoteInAppUpdate )
}
// End of list of possible types for union field recovery_action .
} |
字段 |
targeting |
object (Targeting )
指定恢复操作的定位条件,例如区域、Android SDK 版本、应用版本等。
|
联合字段 recovery_action 。要执行的应用恢复操作的类型。必需。recovery_action 只能是下列其中一项: |
remoteInAppUpdate |
object (RemoteInAppUpdate )
操作类型为远程应用内更新。为此,我们同时创建了一个可下载的恢复模块,以用于测试目的。
|
响应正文
如果成功,响应正文将包含一个新创建的 AppRecoveryAction
实例。
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/androidpublisher
RemoteInAppUpdate
JSON 表示法 |
{
"isRemoteInAppUpdateRequested": boolean
} |
字段 |
isRemoteInAppUpdateRequested |
boolean
必需。如果需要“远程应用内更新”操作类型,请将此属性设为 true。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-29。
[null,null,["最后更新时间 (UTC):2024-08-29。"],[[["Create a draft app recovery action to address issues within your app, without immediate execution."],["Define targeting criteria such as regions, Android versions, and app versions to control which users receive the recovery action."],["Specify the recovery action type, in this case, a remote in-app update, enabling you to deliver a downloadable recovery module to affected users."],["Utilize the provided HTTP request structure with the necessary path parameters and request body to initiate the draft creation."],["This action requires authorization with the `https://www.googleapis.com/auth/androidpublisher` scope."]]],["This document details creating an app recovery action using a POST request to `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/appRecoveries`. The request requires the app's package name as a path parameter. The request body must include `targeting` criteria and specify the `recovery_action`, with the only supported type being `remoteInAppUpdate`. This sets the `isRemoteInAppUpdateRequest` field to `true`. Successful requests return an `AppRecoveryAction` instance, and the operation requires the `androidpublisher` OAuth scope.\n"]]