您可以通过 MAX 控制面板创建新的竞争对手规则和/或风险内容规则。 您一次只能创建一条规则。 但您也可以使用本页介绍的 Ad Review 规则管理 API,在一次请求中查看或创建多条规则。
此 API 中有两个端点:
/v1/rules/competitors
/v1/rules/competitors 发送 GET 请求,以查看您所有预定义的竞争对手规则(活跃和暂停的规则)。/v1/rules/competitors 发送 POST 请求,以创建新的竞争对手规则。/v1/rules/risky
/v1/rules/risky 发送 GET 请求,以查看您所有预定义的风险内容规则(活跃 and 暂停的规则)。/v1/rules/risky 发送 POST 请求,以创建新的风险内容规则。本页的以下部分将更详细地介绍这些端点。
您必须对每个 API 请求进行身份验证。
为此,请在请求中添加 Api-Key HTTP 标头,并将其值设置为您账户的 Ad Review Key。
您可以在 AppLovin 控制面板的 Account > General > Keys 部分找到您的 Ad Review Key。
https://api-safedk.applovin.com/v1/rules/competitors
POST 请求体{
"rules": [
{
"name": "android title rule",
"platform": "android",
"package_names": ["com.mytest.app"],
"rule_type": "title",
"value": ["com.examplegames.solitaire", "com.eg.Bricks"]
},
⋮
]
}
| 名称 | 类型 | 描述 / 有效值 | 创建时必需 (POST) |
|---|---|---|---|
name | string | 规则名称(多条规则可以使用相同的名称)。最大长度为 35 个字符。规则名称可以包含字母数字字符、_、:、-、& 或 。 | true |
platform | string | "android" 或 "ios" | true |
package_names | string[] | 与此规则关联的发行商应用的包名 / bundle ID(例如 "com.my.test.app")。如果您在此处传递一个空数组,您的规则将适用于此平台的所有应用。注意: 如果其中一个名称对应的应用与所选平台不匹配,则整条规则无效。 | false |
rule_type | string | "title"、"store_category" 或 "advertiser" | true |
value | string[] | 由 rule_type 字段指示的广告特征的可能值数组。如果广告与这些特征中的任何一个字符串匹配,则此规则将标记该广告。注意: 如果其中一个值不适合所选平台(例如,您的规则适用于 Android 应用,但您传递了 iTunes ID),则整条规则无效,API 将拒绝该规则。该数组中字符串的正确值取决于您选择的 platform 和 rule_type(请参阅下文 "有效规则值")。 | true |
Api-Key HTTP 标头,并将其值设置为您账户的 Ad Review Key。
您可以在 AppLovin 控制面板的 Account > General > Keys 部分找到您的 Ad Review Key。POST)响应包含一个具有三个元素的哈希:
updated_rules——新创建的规则,以及此请求重新激活的任何已暂停规则existing_rulesinvalid_rules这些元素中的每一个都包括:
total——一个整数,表示此元素涵盖的规则总数rules——一个包含相关 rule 对象的数组(与 POST 请求中的 rule 对象类型相同——有关此对象的元素,请参阅上文 "请求体元素表")GET)成功的响应包含所有现有自定义竞争对手规则对象的数组。
这不包括由 MAX Ad Review 自动生成的任何规则。
此响应对象的元素包括 name、platform、package_names、rule_type 和 value(有关这些元素的说明,请参阅上文 "请求体元素表"),以及 is_active(如果规则处于活跃状态,则为 true,否则为 false)。
[
{
"name": "android title rule",
"platform": "android",
"package_names":["com.test.my_first_app","com.test.my_second_app"],
"rule_type": "title",
"value": ["solitaire", "block", "com.games.solitaire", "com.bestgames.Bricks"],
"is_active": "true"
},
{
"name": "ios title rule",
"platform": "ios",
"rule_type": "title",
"value": ["1449713068"],
"is_active": "false"
}
]
/v1/rules/risky 端点要创建新的风险内容规则,请向 risky 端点发送 POST 请求。
在请求体中包含必需的字段,如下所述。
您可以在每个请求中创建多个风险内容规则。
这将创建所有处于活跃状态的新规则。
如果已经存在相同的活跃风险内容规则,API 不会再次添加该规则。
相反,它会将该规则包含在响应的 existing_rules 数组中。
如果存在相同的暂停规则,其状态将变为活跃。
所有新规则或重新激活的规则都会出现在响应的 updated_rules 数组中。
如果规则包含无效值,API 不会添加该规则,而是将其包含在响应的 invalid_rules 数组中。
要查看所有现有的风险内容规则(活跃和暂停的规则),请向 risky 端点发送 GET 请求。
此端点不允许您编辑或暂停现有规则。 相反,请在 UI 中进行操作。
https://api-safedk.applovin.com/v1/rules/competitors
POST 请求体{
"rules": [
{
"name": "android title rule",
"platform": "android",
"package_names": ["com.mytest.app"],
"rule_type": "title",
"value": ["com.examplegames.solitaire", "com.eg.Bricks"]
},
⋮
]
}
| 名称 | 类型 | 描述 / 有效值 | 创建时必需 (POST) |
|---|---|---|---|
name | string | 规则名称(多条规则可以使用相同的名称)。最大长度为 35 个字符。规则名称可以包含字母数字字符、_、:、-、& 或 。 | true |
platform | string | "android" 或 "ios" | true |
package_names | string[] | 与此规则关联的发行商应用的包名 / bundle ID(例如 "com.my.test.app")。如果您在此处传递一个空数组,您的规则将适用于此平台的所有应用。注意: 如果其中一个名称对应的应用与所选平台不匹配,则整条规则无效。 | false |
rule_type | string | "title"、"store_category" 或 "advertiser" | true |
value | string[] | 由 rule_type 字段指示的广告特征的可能值数组。如果广告与这些特征中的任何一个字符串匹配,则此规则将标记该广告。注意: 如果其中一个值不适合所选平台(例如,您的规则适用于 Android 应用,但您传递了 iTunes ID),则整条规则无效,API 将拒绝该规则。该数组中字符串的正确值取决于您选择的 platform 和 rule_type(请参阅下文 "有效规则值")。 | true |
Api-Key HTTP 标头,并将其值设置为您账户的 Ad Review Key。
您可以在 AppLovin 控制面板的 Account > General > Keys 部分找到您的 Ad Review Key。POST)响应包含一个具有三个元素的哈希:
updated_rules——新创建的规则,以及此请求重新激活的任何已暂停规则existing_rulesinvalid_rules这些元素中的每一个都包括:
total——一个整数,表示此元素涵盖的规则总数rules——一个包含相关 rule 对象的数组(与 POST 请求中的 rule 对象类型相同——有关此对象的元素,请参阅上文 "请求体元素表")GET)成功的响应包含所有现有自定义竞争对手规则对象的数组。
这不包括由 MAX Ad Review 自动生成的任何规则。
此响应对象的元素包括 name、platform、package_names、rule_type 和 value(有关这些元素的说明,请参阅上文 "请求体元素表"),以及 is_active(如果规则处于活跃状态,则为 true,否则为 false)。
[
{
"name": "android title rule",
"platform": "android",
"package_names":["com.test.my_first_app","com.test.my_second_app"],
"rule_type": "title",
"value": ["solitaire", "block", "com.games.solitaire", "com.bestgames.Bricks"],
"is_active": "true"
},
{
"name": "ios title rule",
"platform": "ios",
"rule_type": "title",
"value": ["1449713068"],
"is_active": "false"
}
]
/v1/rules/risky 端点要创建新的风险内容规则,请向 risky 端点发送 POST 请求。
在请求体中包含必需的字段,如下所述。
您可以在每个请求中创建多个风险内容规则。
这将创建所有处于活跃状态的新规则。
如果已经存在相同的活跃风险内容规则,API 不会再次添加该规则。
相反,它会将该规则包含在响应的 existing_rules 数组中。
如果存在相同的暂停规则,其状态将变为活跃。
所有新规则或重新激活的规则都会出现在响应的 updated_rules 数组中。
如果规则包含无效值,API 不会添加该规则,而是将其包含在响应的 invalid_rules 数组中。
要查看所有现有的风险内容规则(活跃和暂停的规则),请向 risky 端点发送 GET 请求。
此端点不允许您编辑或暂停现有规则。 相反,请在 UI 中进行操作。
https://api-safedk.applovin.com/v1/rules/risky
POST 请求体{
"rules": [
{
"name": "android title rule",
"platform": "android",
"package_names": ["com.my.android.test.app"],
"rule_type": "title",
"value": ["com.games.solitaire","com.games.Bricks"]
},
{
"name": "ios title rule",
"platform": "ios",
"rule_type": "title",
"value": ["1349713000"]
},
{
"name": "store_category rule",
"platform": "ios",
"rule_type": "store_category",
"value": ["Action", "Card"]
},
{
"name": "advertiser ios rule",
"platform": "ios",
"rule_type": "advertiser",
"value": ["ExampleAdvertiser1", "ExampleAdvertiser2"]
},
{
"name": "content_rating ios rule",
"platform": "ios",
"rule_type": "content_rating",
"value": ["12+", "17+"]
},
{
"name": "advisory ios rule",
"platform": "ios",
"rule_type": "advisory",
"value": ["Frequent/Intense Alcohol, Tobacco or Drug Use or References"]
},
{
"name": "web_domain rule",
"platform": "ios",
"rule_type": "web_domain",
"value": ["test.com", "example.com"]
},
{
"name": "ios_platform_with_android_package_name_rule", //invalid rule
"platform": "ios",
"package_names": "com.my.android.test.app",
"rule_type": "title",
"value": ["1449713068"]
},
{
"name": "ios_platform_with_android_title_value", //invalid rule
"platform": "ios",
"rule_type": "title",
"value": ["1449713068", "com.games.solitaire1"]
},
{
"name": "ios_platform_with_android_content_rating_value", //invalid rule
"platform": "ios",
"rule_type": "content_rating",
"value": ["Everyone"]
}
]
}
请参阅下文 "响应格式 (POST): 示例",了解如何在对此请求的响应中报告无效规则。
| 名称 | 类型 | 描述 / 有效值 | 创建时必需 (POST) |
|---|---|---|---|
name | string | 规则名称(多条规则可以使用相同的名称)。最大长度为 35 个字符。规则名称可以包含字母数字字符、_、:、-、& 或 | true |
platform | string | "android" 或 "ios" | true |
package_names | string[] | 与此规则关联的发行商应用的包名 / bundle ID(例如 "com.my.test.app")。如果您在此处传递一个空数组,您的规则将适用于此平台的所有应用。注意: 如果其中一个名称对应的应用与所选平台不匹配,则整条规则无效。 | false |
rule_type | string | "title"、"store_category"、"advertiser"、"web_domain"、"content_rating" 或 "advisory" | true |
value | string[] | 由 rule_type 字段指示的广告特征的可能值数组。如果广告与这些特征中的任何一个字符串匹配,则此规则将标记该广告。注意: 如果其中一个值不适合所选平台(例如,您的规则适用于 Android 应用,但您传递了 iTunes 内容分级值),则整条规则无效,API 将拒绝该规则。该数组中字符串的正确值取决于您选择的 platform 和 rule_type(请参阅下文 "有效规则值")。 | true |
Api-Key HTTP 标头,并将其值设置为您账户的 Ad Review Key。
您可以在 AppLovin 控制面板的 Account > General > Keys 部分找到您的 Ad Review Key。POST)响应包含一个具有三个元素的哈希:
updated_rules——新创建的规则以及此请求重新激活的任何已暂停规则existing_rulesinvalid_rules这些元素中的每一个都包括:
total——一个整数,表示此元素涵盖的规则总数rules——一个包含相关 rule 对象的数组(与 POST 请求中的 rule 对象类型相同——有关此对象的元素,请参阅上文 "请求体元素表")"updated_rules": {
"total": 6
"rules": {[
{
"name": "android title rule",
"platform": "android",
"package_names": ["com.my.android.test.app"],
"rule_type": "title",
"value": ["com.games.solitaire","com.games.Bricks"]
}, {…},{…},{…},{…},{…}
]
},
"invalid_rules": {
"total": 3
"rules": [
{
"name": "ios_platform_with_android_package_name_rule", //invalid rule
"platform": "ios",
"my_apps_package_name": "com.my.android.test.app",
"rule_type": "title",
"value": ["1449713068"]
}, {…},{…}
]
},
"existing_rules": {
"total": 1
"rules":[
{
"name": "web_domain rule",
"platform": "ios",
"rule_type": "web_domain",
"value": ["test.com", "example.com"]
}
]
}
GET)成功的响应包含所有现有自定义风险内容规则对象的数组。
这不包括由 MAX Ad Review 自动生成的任何规则。
此响应对象的元素包括 name、platform、package_names、rule_type 和 value(有关这些元素的说明,请参阅上文 "请求体元素表"),以及 is_active(如果规则处于活跃状态,则为 true,否则为 false)。
[
{
"name": "android title rule",
"platform": "android",
"package_names":["com.test.my_first_app","com.test.my_second_app"],
"rule_type": "title",
"value": ["solitaire", "block", "com.games.solitaire", "com.bestgames.Bricks"],
"is_active": "true"
},
{
"name": "ios title rule",
"platform": "ios",
"rule_type": "title",
"value": ["1449713068"],
"is_active": "false"
}
]
GET 请求以避免超时如果规则太多,向这些端点发送的 GET 请求在尝试检索并发送所有规则时可能会超时。
要解决此问题,您可以限制这些端点返回的规则数量。
为此,请添加 limit 查询参数。
然后,您可以通过添加 offset 查询参数来分页浏览所有规则。
例如:
GET /v1/rules/risky?limit=10&offset=0——获取前十条风险内容规则GET /v1/rules/risky?limit=10&offset=10——获取下十条风险内容规则GET /v1/rules/risky?limit=10&offset=20——获取下十条风险内容规则如果您到达列表末尾且没有更多规则可返回,则响应将是一个空数组。
rule_type | 有效值 |
|---|---|
advertiser | 任何有效的广告主名称(例如 "Super Lucky Casino")。请从商店复制完全一致的广告主名称(区分大小写)。 |
advisory | 来自 Google Play 的分级提示字符串(例如 "Sexual Content")。请参阅下文 “分级提示有效值”。 |
content_rating | 美国的 Google Play 内容分级:"Everyone"、"Everyone 10+"、"Teen"、"Mature 17+" 或 "Adults only 18+"。 |
store_category | Google Play 类别字符串。请参阅下文 “商店类别有效值”。 |
title | 应用包名(此 API 不支持自由文本规则,仅 UI 支持) |
web_domain | 有效的 Web 域名(不含 “http(s)”、“www” 或末尾斜杠),例如:"apple.com" |
"Action""Action & Adventure""Adventure""Arcade""Art & Design""Auto & Vehicles""Beauty""Board""Books & Reference""Brain Games""Business""Card""Cards""Casino""Casual""Comics""Communication""Creativity""Dating""Education""Educational""Entertainment""Events""Finance""Food & Drink""Health & Fitness""House & Home""Libraries & Demo""Lifestyle""Maps & Navigation""Medical""Music""Music & Audio""Music & Video""Music Games""News & Magazines""Parenting""Personalization""Photography""Pretend Play""Productivity""Puzzle""Racing""Role Playing""Shopping""Simulation""Social""Sports""Strategy""Tools""Travel & Local""Trivia""Video Players & Editors""Weather""Word""Word Games""Alcohol Reference""Alcohol and Tobacco Reference""Blood""Blood and Gore""Cartoon Violence""Comic Mischief""Crude Humor""Diverse Content: Discretion Advised""Drug Reference""Drug and Alcohol Reference""Fantasy Violence""Fear""Gambling""General""Horror""Implied Violence""Intense Violence""Language""Mild Blood""Mild Fantasy Violence""Mild Language""Mild Suggestive Themes""Mild Swearing""Mild Violence""Moderate Violence""Nudity""Online Interactivity""Parental Guidance Recommended""Partial Nudity""Real Gambling/Paid Contests""Sexual Content""Sexual Innuendo""Sexual Themes""Sexual Violence""Simulated Gambling""Strong Language""Strong Sexual Content""Strong Violence""Suggestive Themes""Tobacco Reference""Use of Alcohol""Use of Alcohol and Tobacco""Use of Drugs""Use of Drugs and Alcohol""Use of Tobacco""Violence""Violent References"rule_type | 有效值 |
|---|---|
advertiser | 任何有效的广告主名称(例如 "Super Lucky Casino")。请从商店复制完全一致的广告主名称(区分大小写)。 |
advisory | 来自 iTunes 的分级提示字符串(例如 "Frequent/Intense Alcohol, Tobacco or Drug Use or References")。请参阅下文 “分级提示有效值”。 |
content_rating | iTunes 在美国的内容分级值:"4+"、"9+"、"12+" 或 "17+" |
store_category | iTunes 类别字符串。请参阅下文 “商店类别有效值”。 |
title | iTunes ID(此 API 不支持自由文本规则,仅 UI 支持) |
web_domain | 有效的 Web 域名(不含 “http(s)”、“www” 或末尾斜杠),例如:"apple.com" |
"Action""Adventure""Animals & Nature""Arcade""Art""Board""Book""Books""Business""Card""Casino""Casual""Celebrations""Celebrities""Comics & Cartoons""Developer Tools""Eating & Drinking""Education""Emoji & Expressions""Entertainment""Family""Fashion""Finance""Food & Drink""Games""Gaming""Graphics & Design""Health & Fitness""Kids & Family""Lifestyle""Magazines & Newspapers""Medical""Movies & TV""Music""Navigation""News""People""Photo & Video""Places & Objects""Productivity""Puzzle""Racing""Reference""Role Playing""Role-Playing""Shopping""Simulation""Social Networking""Sports""Sports & Activities""Stickers""Strategy""Travel""Trivia""Utilities""Weather""Word""Frequent/Intense Alcohol, Tobacco or Drug Use or References""Frequent/Intense Alcohol, Tobacco, or Drug Use or References""Frequent/Intense Cartoon or Fantasy Violence""Frequent/Intense Horror/Fear Themes""Frequent/Intense Mature/Suggestive Themes""Frequent/Intense Medical/Treatment Information""Frequent/Intense Profanity or Crude Humor""Frequent/Intense Profanity or Crude Humour""Frequent/Intense Realistic Violence""Frequent/Intense Sexual Content or Nudity""Frequent/Intense Simulated Gambling""Gambling and Contests""Infrequent/Mild Alcohol, Tobacco or Drug Use or References""Infrequent/Mild Alcohol, Tobacco, or Drug Use or References""Infrequent/Mild Cartoon or Fantasy Violence""Infrequent/Mild Horror/Fear Themes""Infrequent/Mild Mature/Suggestive Themes""Infrequent/Mild Medical/Treatment Information""Infrequent/Mild Profanity or Crude Humor""Infrequent/Mild Profanity or Crude Humour""Infrequent/Mild Realistic Violence""Infrequent/Mild Sexual Content and Nudity""Infrequent/Mild Simulated Gambling""Unrestricted Web Access"