Method: apprecovery.addTargeting
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
逐步更新復原動作的指定目標。請注意,您只能展開建立復原動作時選取的條件。
HTTP 要求
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:addTargeting
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
packageName |
string
必要欄位。要更新復原動作的應用程式套件名稱。
|
appRecoveryId |
string (int64 format)
必要欄位。應用程式復原動作對應的 ID。
|
要求主體
要求主體的資料會採用以下結構:
欄位 |
targetingUpdate |
object (TargetingUpdate )
指定更新區域,例如區域、Android SDK 版本等。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/androidpublisher
TargetingUpdate
更新指定目標的類型。請注意,系統一律是「指定目標」的子項目。
JSON 表示法 |
{
// Union field criteria can be only one of the following:
"regions": {
object (Regions )
},
"androidSdks": {
object (AndroidSdks )
},
"allUsers": {
object (AllUsers )
}
// End of list of possible types for union field criteria .
} |
欄位 |
聯集欄位 criteria 。復原動作中的指定條件。請注意,除非這些條件並非「all_users」,否則所有條件都必須與建立應用程式復原動作時使用的條件相同。否則更新會遭到拒絕。如果是先前設為指定 all_users 的條件,就無法更新指定目標。如果無法按照要求展開目標群組,系統會擲回錯誤。criteria 只能是下列其中一項: |
regions |
object (Regions )
復原動作鎖定了其他區域。
|
androidSdks |
object (AndroidSdks )
復原動作指定其他 Android SDK 級別。
|
allUsers |
object (AllUsers )
已指定所有使用者。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-05-21 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-05-21 (世界標準時間)。"],[[["Incrementally update targeting for a recovery action, expanding only criteria selected during its creation."],["Utilize an HTTP POST request to `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:addTargeting` to initiate the update."],["The request body must contain a `targetingUpdate` object specifying updates for regions, Android SDK versions, or user targeting."],["Targeting updates must align with the criteria initially set for the recovery action; attempting to expand beyond those parameters will result in an error."],["Successful updates result in an empty response body."]]],["This outlines how to update the targeting of an app recovery action using a `POST` request to a specific URL. The request requires the app's package name and recovery action ID as path parameters. The request body should contain a `targetingUpdate` object, specifying criteria like `regions` or `androidSdks` to expand the targeted group, the criteria used must be the same that was used in creation of the action. If successful, the response is empty; requires an `androidpublisher` authorization scope.\n"]]