Method: apprecovery.addTargeting
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Cập nhật dần tiêu chí nhắm mục tiêu cho hành động khôi phục. Xin lưu ý rằng bạn chỉ có thể mở rộng những tiêu chí được chọn trong quá trình tạo hành động khôi phục.
Yêu cầu HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:addTargeting
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Tham số |
packageName |
string
Bắt buộc. Tên gói của ứng dụng mà thao tác khôi phục sẽ được cập nhật.
|
appRecoveryId |
string (int64 format)
Bắt buộc. Mã nhận dạng tương ứng với thao tác khôi phục ứng dụng.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"targetingUpdate": {
object (TargetingUpdate )
}
} |
Trường |
targetingUpdate |
object (TargetingUpdate )
Chỉ định các bản cập nhật nhắm mục tiêu như khu vực, phiên bản sdk Android, v.v.
|
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ trống.
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/androidpublisher
TargetingUpdate
Cập nhật loại cho tiêu chí nhắm mục tiêu. Lưu ý rằng mục này luôn là một nhóm nhỏ Nhắm mục tiêu.
Biểu diễn dưới dạng 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 .
} |
Trường |
Trường kết hợp criteria . Tiêu chí nhắm mục tiêu trong thao tác khôi phục. Xin lưu ý rằng trừ khi tiêu chí không phải là all_users, thì tiêu chí phải luôn giống với tiêu chí được dùng trong quá trình tạo hành động khôi phục ứng dụng. Nếu không, bản cập nhật sẽ bị từ chối. Trong trường hợp trước đây tiêu chí đã được đặt để nhắm mục tiêu all_users, thì bạn không thể cập nhật tiêu chí nhắm mục tiêu. Trong trường hợp không thể mở rộng nhóm mục tiêu theo yêu cầu, hệ thống sẽ báo lỗi. criteria chỉ có thể là một trong những trạng thái sau đây: |
regions |
object (Regions )
Thao tác khôi phục sẽ nhắm đến các khu vực khác.
|
androidSdks |
object (AndroidSdks )
Các cấp độ SDK Android khác được nhắm mục tiêu bằng thao tác khôi phục.
|
allUsers |
object (AllUsers )
Tất cả người dùng đều được nhắm mục tiêu.
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eIncrementally update targeting for a recovery action, expanding only criteria selected during its creation.\u003c/p\u003e\n"],["\u003cp\u003eUtilize an HTTP POST request to \u003ccode\u003ehttps://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:addTargeting\u003c/code\u003e to initiate the update.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain a \u003ccode\u003etargetingUpdate\u003c/code\u003e object specifying updates for regions, Android SDK versions, or user targeting.\u003c/p\u003e\n"],["\u003cp\u003eTargeting updates must align with the criteria initially set for the recovery action; attempting to expand beyond those parameters will result in an error.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful updates result in an empty response body.\u003c/p\u003e\n"]]],["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"],null,["# Method: apprecovery.addTargeting\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [TargetingUpdate](#TargetingUpdate)\n - [JSON representation](#TargetingUpdate.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nIncrementally update targeting for a recovery action. Note that only the criteria selected during the creation of recovery action can be expanded.\n\n### HTTP request\n\n`POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:addTargeting`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | `string` Required. Package name of the app for which recovery action is to be updated. |\n| `appRecoveryId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. ID corresponding to the app recovery action. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"targetingUpdate\": { object (/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#TargetingUpdate) } } ``` |\n\n| Fields ||\n|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `targetingUpdate` | `object (`[TargetingUpdate](/android-publisher/api-ref/rest/v3/apprecovery/addTargeting#TargetingUpdate)`)` Specifies targeting updates such as regions, android sdk versions etc. |\n\n### Response body\n\nIf successful, the response body is empty.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`\n\nTargetingUpdate\n---------------\n\nUpdate type for targeting. Note it is always a subset Targeting.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { // Union field `criteria` can be only one of the following: \"regions\": { object (/android-publisher/api-ref/rest/v3/Regions) }, \"androidSdks\": { object (/android-publisher/api-ref/rest/v3/AndroidSdks) }, \"allUsers\": { object (/android-publisher/api-ref/rest/v3/AllUsers) } // End of list of possible types for union field `criteria`. } ``` |\n\n| Fields ||\n|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| Union field `criteria`. Criteria for targeting in recovery action. Note that unless the criteria is not all_users, the criteria should always be the same as what was used during creation of app recovery action. Otherwise the update is rejected. In case criteria was previously set to target all_users, targeting update is impossible. In case the target group cannot be expanded as per the request, an error is thrown. `criteria` can be only one of the following: ||\n| `regions` | `object (`[Regions](/android-publisher/api-ref/rest/v3/Regions)`)` Additional regions are targeted by the recovery action. |\n| `androidSdks` | `object (`[AndroidSdks](/android-publisher/api-ref/rest/v3/AndroidSdks)`)` Additional android sdk levels are targeted by the recovery action. |\n| `allUsers` | `object (`[AllUsers](/android-publisher/api-ref/rest/v3/AllUsers)`)` All users are targeted. |"]]