您可以使用 /app 终端创建新应用,更新现有应用,并调取应用信息。这是大规模自动化应用管理所依赖的主要终端。
通过识别码获取应用、通过商店 ID 获取应用以及列出所有应用等 检索 操作仅返回 通过该 API 创建或更新的 应用。要使用您账户中的任何应用 (包括在控制面板中创建的应用),请使用应用设置终端。
通过模板创建或更新应用
使用模板应用的设置为安卓、iOS 或两者创建或更新应用。
工作原理
- API 会根据所请求的平台及其默认商店 ID 查找现有应用。
- 如果没有应用,会创建一个;否则会为现有应用添加缺失的平台。
- 如果您提供
stores,系统会添加或更新其他安卓商店。应用 scheme、iOS 应用 ID 前缀和 Android 应用链接指纹也会应用。 - 如果您提供
subdomain,且应用尚无品牌化子域,系统则会加以设置。 - 需要迁移时,复制模板应用设置的后台作业会加入队列。
- 响应中包含用于跟踪该操作的
ticket_token。
下列任一条件满足时,后台作业就会触发:
- 该应用或所请求的平台为新建,或首次导入应用自动化
channel_setup、override_settings、editors或ios_pv_shared_secret字段被更新- iOS
default_device_type已更改 - 已添加新的 Android 应用链接证书指纹
force_update设置为true- 上一次迁移已失败
仅更改 stores、app_scheme、app_id_prefix 或 subdomain 不会为已通过 API 管理的应用触发后台迁移。其他设置更改和 force_update 仍会决定是否需要迁移。商店、scheme、前缀和子域写入会在任何迁移作业启动前应用。如需同时复制更新后的模板设置,请将 force_update 设置为 true。
API 协议
终端: https://automate.adjust.com/app-automation/app
方法: POST
请求正文: 创建/更新应用负载
响应: 应用迁移响应
参数
| 参数 | 数据类型 | 必要参数 | 描述 |
|---|---|---|---|
name | String | 是 | 应用的显示名称。 |
platforms | Object | 是 | android、ios,或两者兼有,每个都包含平台设置。 |
default_platform | String | 否 | 新应用的默认平台。纳入 platforms 时默认为 android,否则为 ios。必须纳入 platforms。现有应用会保留其默认平台。 |
template_app_token | String | 否 | 用于从中复制设置的应用识别码。默认使用为您的账户配置的模板。 |
sections | Array[String] | 否 | 要迁移的应用部分。如果省略或留空,则会迁移所有部分。 |
force_update | Boolean | 否 | 设置为 true 时,即使应用未发生变更,也会复制更新后的模板设置。默认设置为 false。 |
override_settings | Object | 否 | 要为应用改写的设置。适用于所有请求的平台。 |
currency | String | 否 | 货币代码,例如 EUR 或 GBP。默认为模板的货币。仅可在创建应用时设置。 |
editors | Array[String] | 否 | 需要应用访问权限的自定义用户电子邮件地址。管理员、编辑和读者已拥有访问权限。 |
ios_pv_shared_secret | String | 否 | iOS 收入验证共享密钥。 |
verification | Boolean | 否 | 当您的账户启用验证功能时,请验证 iOS 应用。默认设置为 false。 |
subdomain | Object | 否 | 应用的品牌化子域标签。应用级字段;不会从模板复制。 |
平台
platforms 中的每个条目都包含以下字段:
| 参数 | 数据类型 | 必要参数 | 描述 |
|---|---|---|---|
store_id | String | 是 | 默认商店 ID:iOS 的数字 iTunes Store ID,或默认安卓应用商店中的 ID,例如 Google Play Bundle ID 或华为应用 ID。 |
bundle_id | String | 是 | 此平台应用的 Bundle ID。 |
channel_setup | Object | 否 | 此平台的合作伙伴配置。 |
stores | Object | 否 | 其他安卓应用商店。仅限安卓。 |
app_scheme | String | 否 | 应用 scheme 适用于安卓或 iOS。从未从模板中复制。 |
app_id_prefix | String | 否 | iOS 应用 ID 前缀。如果模板中有前缀,则默认使用模板的前缀。仅限 iOS。 |
android_app_links_sha256_cert_fingerprints | Array[String] | 否 | 要添加的 Android 应用链接证书指纹。仅限安卓。 |
default_device_type | String | 否 | iOS 设备类型:phone、tablet 或适用于通用设备的 ""。仅限 iOS。 |
模板必须配置好所有请求的平台。如果模板缺失某个平台,请求会在进行任何应用更改之前失败。
若要向现有应用添加平台,请在同一请求中包含现有平台的标识符和新平台的设置。
若要仅迁移现有多平台应用中的一个平台,请在 platforms 中仅包含该平台。其他平台配置以及该应用的默认平台将予以保留。属于不同应用的平台 ID 不能合并到同一个应用中。
旧版请求
顶层包含 platform、store_id 和 bundle_id 的旧版请求会保留原有的扁平响应。可选的 channel_setup、stores、default_device_type、app_scheme、app_id_prefix、android_app_links_sha256_cert_fingerprints 和 subdomain 也仍保留在顶层。在请求中使用此格式或 platforms。请参见旧版示例。
iOS 设备类型
在POST /app上使用 platforms.ios.default_device_type 来设置 iOS 设备类型。在包含 "platform": "ios" 的旧版请求中,将 default_device_type 发送到顶层。
| 值 | 设备类型 |
|---|---|
"phone" | iPhone |
"tablet" | iPad |
"" | 通用 - iPhone 和 iPad |
省略该字段可保留当前设备类型。发送空字符串 ("") 可将其重置为通用。null 等其他值会被拒绝。此字段仅支持 iOS,且不会从模板应用中复制。
通过 POST /app 更改设备类型会触发模板迁移。若要在不进行迁移的情况下仅更新设备类型,请使用 POST /app/{app_token} 并添加顶层 default_device_type 字段。要更新的平台必须是 iOS。您无法将此字段与 stores 结合使用。
其他安卓应用商店
使用 platforms.android.stores 添加另一个安卓应用商店,或更新现有的非默认商店 ID。旧版请求和 POST /app/{app_token} 接受顶层 stores。如果您省略此字段,其他商店将保持不变。
默认应用商店是指在应用平台设置中标记为 default_store: true 的商店,这有别于默认平台。
每个键都是控制面板商店名称,例如 huawei、amazon 或 galaxy。每个值仅包含必填的非空白 store_id:
{ "stores": { "huawei": { "store_id": "C123456789" }, "galaxy": { "store_id": "com.example.myapp.galaxy" } }}stores必须包含至少一个条目,且仅支持安卓应用。不支持的商店名称将被拒绝。- 缺少的应用商店会添加为非默认商店。现有的非默认商店 ID 已更新。
- 您省略的应用商店、重定向 URL,以及默认商店选择均会保留。此字段不会移除商店或更改默认商店 ID。
- 应用的默认商店 ID 和
bundle_id将保持不变。如需更改默认商店 ID,请在POST /app/{app_token}中使用不带stores的顶层store_id。 - 模板应用不会复制其他应用商店。
stores既不是迁移部分,也不是override_settings字段。
对于 POST /app,platforms.android.store_id(或旧版顶层 store_id)用于在默认应用商店中标识该应用。新的安卓应用使用模板应用的默认安卓应用商店。现有应用会保留其默认商店。
请求中的所有商店变更都会在一次平台更新中发送。重复发送包含相同商店 ID 的请求不会创建重复的商店。响应 store_id 字段仍包含默认商店 ID;请结合使用应用设置终端与 sections=app_info 来调取已配置的商店。
应用 scheme 和应用 ID 前缀
在 POST /app 上使用 app_scheme 和 app_id_prefix。将它们放入相应的 platforms.android 或 platforms.ios 对象中。请在旧版请求中于顶层发送它们。这些字段在 POST /app/{app_token} 上不受支持。
app_scheme 对于安卓和 iOS,此项为可选,且绝不会从模板中复制。省略此项或发送 null,以保留目标应用现有的 scheme。该 scheme 必须与目标应用构建中注册的 scheme 匹配。
- 对于安卓,所有已配置的商店(包括在同一请求中添加或更新的商店)均适用一个平台级 scheme。
stores中的条目仅接受store_id;不支持为每个商店单独设置方案。 - 对于 iOS,该方案适用于默认商店。
app_id_prefix 仅适用于 iOS。如果模板应用有 iOS 应用 ID 前缀,可将其省略,或发送 null 以复制该前缀。显式值会改写模板。如果模板没有前缀,则保留目标应用现有的前缀。
如果提供,这两个字段都必须是非空字符串。这些字段不是迁移部分或 override_settings 字段。Scheme 和前缀写入操作在任何背景迁移之前运行,并显示在状态终端上的 result.stores 下。
Android 应用链接证书指纹
在 POST /app 上使用 platforms.android.android_app_links_sha256_cert_fingerprints,以添加目标应用签名证书中的 SHA-256 指纹。对于带有 "platform": "android" 的旧版请求,请在顶层发送该字段。此字段仅适用于安卓,在POST /app/{app_token}上不受支持。
- 提供一个非空数组,其中每个元素包含 32 个以冒号分隔的十六进制字节。大写和小写十六进制字符均可接受。
- 提供的值会被添加,而不会删除现有指纹或添加重复值。
- 省略该字段或发送
null,以保留现有指纹。空数组会被拒绝;此字段无法清除现有值。 - 指纹不会从模板中复制。添加新指纹会触发模板迁移。
这些应用链接指纹与 SDK 签名配置 中所述的 SDK 签名指纹 (android_fingerprints) 不同。
以下完整请求会设置 scheme、iOS 前缀和 Android 应用链接指纹。这假定模板已配置好两个平台,并将 Google Play 设为默认的安卓商店。将示例标识符、scheme、前缀,以及指纹替换为目标应用的值。
{ "name": "My App", "platforms": { "android": { "store_id": "com.example.myapp", "bundle_id": "com.example.myapp", "app_scheme": "com.example.myapp", "android_app_links_sha256_cert_fingerprints": [ "AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA" ], "stores": { "huawei": { "store_id": "C123456789" } } }, "ios": { "store_id": "123456789", "bundle_id": "com.example.myapp.ios", "app_scheme": "com.example.myapp.ios", "app_id_prefix": "PREFIX1234" } }}若要继承模板的 iOS 应用 ID 前缀,请在示例中省略 app_id_prefix。
品牌化子域
使用 subdomain 在 POST /app 上为目标应用设置品牌化域名标签。POST /app/{app_token} 不支持此字段。请参阅设置品牌化域名相关内容。
subdomain 是应用级字段。请在请求顶层予以发送,而非在 platforms 内部。只会写入 subdomain 标签;如果您发送 domain,则会被系统忽略。
{ "subdomain": { "subdomain": "mybrand" }}- 该值仅来自此请求,并非复制自模板应用。
- 仅当应用尚无品牌化子域时,才会应用该标签。现有的非空白标签将保持不变。
- 如果现有应用的标签缺失、为 null 或空白(例如
{"domain": "go.link", "subdomain": null}),会被视为未设置,并可填写。 - 在该请求中,
subdomain.subdomain为必填项,且不得留空。省略subdomain对象即可跳过此次写入操作。如果发送domain,则不得留空;该值不可编辑。 - 系统会在迁移作业前执行写入操作。仅设置子域不会将迁移任务加入队列。
- 如果无法设置子域,请求会失败并返回 HTTP 400。
- 子域结果会记录在状态终端上的
result.subdomain下。如有商店结果,会记录在result.stores下。
Section
使用 sections 参数,可仅迁移特定设置:
{ "sections": ["partners", "events", "fraud_prevention_settings"]}对于同时涉及两个平台的请求,各部分按以下顺序执行:
| 部分 | 平台 |
|---|---|
partners、 purchase_verification | 每个请求的平台 |
signature | 安卓 |
skad_network_v4、 attribution_privacy_model | iOS |
| 所有其他部分 | 针对该应用一次 |
要查看完整的可用部分列表,请参阅应用部分。app_info 部分为只读。您可以通过应用设置终端调取该项,但 API 会在 sections 中以 validation_error 拒绝该项。
高级链接设置
使用 advanced_link_settings 部分,从模板应用复制链接抓取、优化延迟深度链接、自定义网页目标参数以及推广活动到 UTM 的转换设置。
- 将
"advanced_link_settings"纳入sections,或省略sections以迁移所有设置。 - 要为目标应用使用不同的值,请在
override_settings.advanced_link_settings中发送这些值。未提供的改写字段会使用模板应用的值。如果模板中没有某个字段且未设置改写,则目标应用中的该字段值保持不变。 - 将布尔字段设为
false,即可禁用该设置。例如,enable_deeplink_in_session_response控制优化延迟深度链接。 - 要将 Adjust 推广活动结构转换为 UTM 标签,请将
auto_translate_adjust_campaign_structure_to_utm_tags设置为true。使用campaign_structure_to_utm_tags_translation_params选择每个推广活动层级的 UTM 标签。若要禁用转换,请将启用标志设为false;无需移除映射。
有关字段定义及允许使用的转换键和值,请参阅高级链接设置字段。包含不受支持的转换键或 UTM 值的请求会返回 HTTP 400,并附带 error_code: "validation_error"。
{ "name": "My App", "platforms": { "android": { "store_id": "com.example.myapp", "bundle_id": "com.example.myapp" } }, "sections": ["advanced_link_settings"], "force_update": true, "override_settings": { "advanced_link_settings": { "link_scrapping_enabled": true, "enable_deeplink_in_session_response": true, "auto_append_custom_parameters_to_web_destinations": true, "auto_translate_adjust_campaign_structure_to_utm_tags": true, "campaign_structure_to_utm_tags_translation_params": { "adgroup": ["utm_term"], "network": ["utm_source", "utm_medium"], "campaign": ["utm_campaign"], "creative": ["utm_content"] } } }}覆盖设置
使用 override_settings,可自定义应用的特定设置,而不是使用模板应用的值。覆盖设置将被保存,并自动应用于后续迁移。
针对覆盖设置,您可以进行三种操作:
| 操作 | 操作方法 |
|---|---|
| 查看 | 使用 GET /app/{app_token}/settings 查看当前应用设置。使用 GET /app/{app_token} 查看 additional_info.overrides 中保存的覆盖负载。 |
| 创建/更新 | 将 override_settings发送至 POST /app 或 POST /app/{app_token}。新值会合并到已保存的替换中,因此您可以仅发送想要更改的字段即可。 |
| 清空 | 使用 "override_settings": null 调用 POST /app/{app_token},移除所有已保存的应用覆盖。 |
对于 partners 覆盖:
- 使用
GET /app/{app_token}/settings中的partners数组形状。 - 合作伙伴按
name匹配。 - 支持的转发标记:
revenue_forwarding、session_forwarding、parameter_forwarding、cost_forwarding、attributed_only、uninstall_forwarding、ad_revenue_forwarding、limited_data_use、inactive_user_definition。 channel_setup是合作伙伴特定字段的平面键值映射。合作伙伴不支持的密钥可能会被控制面板 API 忽略。events_linking是应用事件名称到合作伙伴事件名称的映射。请参阅 EventLinking。- 改写应用于每个请求中的单个应用。若要将其应用于多个应用,请将其另存为改写并迁移,或针对每个应用重复请求。
app_info是只读部分,在override_settings中不受支持。platforms.<platform>.channel_setup(或旧版顶层channel_setup)中的值具有最高优先级。- 缺失值将回退至该平台已保存的渠道设置。
override_settings.partners[].channel_setup用于额外的后备来源。
对于 attribution_settings 覆盖:
- 使用
GET /app/{app_token}/settings返回的数据结构。 - 使用
click_probabilistic_modeling和impression_probabilistic_modeling。已弃用的名称click_fingerprinting和impression_fingerprinting仍被接受。如果同时发送这两个名称,则使用新名称。
对于 s2s 覆盖:
- 使用
GET /app/{app_token}/settings返回的数据结构。 s2s_authentication_scope设置目标应用中需要进行 S2S 认证的终端。s2s_session_tracking_enabled设置会话终端访问权限。这是一个单独的应用设置,因此您可以独立于s2s_authentication_scope启用此设置。- 识别码由
label匹配。改写的token值会被忽略,模板应用中未激活的识别码不会迁移。 - 如果目标应用中没有带有指定
label的识别码,系统将使用您提供的scope创建识别码。支持的范围密钥为event、session、ad_revenue和gdpr。 - 对于已存在的识别码,仅会对齐
active标记。其范围未更改。
{ "override_settings": { "s2s": { "s2s_authentication_scope": ["install", "session"], "s2s_session_tracking_enabled": true, "tokens": [ { "label": "main", "active": true, "scope": { "event": true, "session": true, "ad_revenue": true, "gdpr": true } } ] } }}{ "override_settings": { "partners": [ { "name": "facebook", "revenue_forwarding": false, "session_forwarding": false, "parameter_forwarding": false, "cost_forwarding": false, "attributed_only": false, "uninstall_forwarding": false, "ad_revenue_forwarding": false, "limited_data_use": true, "inactive_user_definition": false, "channel_setup": { "app_id": "651107451918933" }, "events_linking": { "purchase_inapp": "fb_mobile_purchase" } }, { "name": "snapchat", "limited_data_use": false, "channel_setup": { "app_id": "1404426295" } } ] }}示例
创建或更新安卓和 iOS 应用
curl --location 'https://automate.adjust.com/app-automation/app' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My App", "default_platform": "android", "platforms": { "android": { "store_id": "com.example.myapp", "bundle_id": "com.example.myapp" }, "ios": { "store_id": "123456789", "bundle_id": "com.example.myapp.ios", "default_device_type": "phone" } }}'{ "adjust_app_token": "abc123xyz", "name": "My App", "default_platform": "android", "platforms": { "android": { "store_id": "com.example.myapp", "bundle_id": "com.example.myapp" }, "ios": { "store_id": "123456789", "bundle_id": "com.example.myapp.ios" } }, "ticket_token": "e5b07bb3-b5f3-40a8-8a2d-197d30b6beff", "sk_app_id": null}两个平台共用一个 adjust_app_token 和一个 ticket_token。可使用状态终端跟踪迁移。
仅迁移现有多平台应用中的 iOS
将此正文连同现有的 iOS 标识符发送至 POST /app。以下合作伙伴设置适用于 iOS。如果提供的设置未发生变化,force_update 也会执行迁移。
{ "name": "My App", "platforms": { "ios": { "store_id": "123456789", "bundle_id": "com.example.myapp.ios", "channel_setup": { "facebook": { "app_id": "987654321" } } } }, "sections": ["partners"], "force_update": true}旧版示例
这些示例采用受支持的扁平请求和响应格式。
创建新的 Android 应用
curl --location 'https://automate.adjust.com/app-automation/app' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My Android App", "bundle_id": "com.example.myapp", "store_id": "com.example.myapp", "platform": "android"}'{ "adjust_app_token": "abc123xyz", "name": "My Android App", "bundle_id": "com.example.myapp", "store_id": "com.example.myapp", "ticket_token": "e5b07bb3-b5f3-40a8-8a2d-197d30b6beff", "sk_app_id": null}创建或更新包含其他商店的安卓应用
curl --location 'https://automate.adjust.com/app-automation/app' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My Android App", "bundle_id": "com.example.myapp", "store_id": "com.example.myapp", "platform": "android", "stores": { "huawei": { "store_id": "C123456789" }, "galaxy": { "store_id": "com.example.myapp.galaxy" } }}'此示例假设 Google Play 是默认商店。可以使用同一请求,为具有此默认商店 ID 的现有应用添加或更新其他商店。
设置品牌化子域
curl --location 'https://automate.adjust.com/app-automation/app' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My Android App", "bundle_id": "com.example.myapp", "store_id": "com.example.myapp", "platform": "android", "subdomain": { "subdomain": "mybrand" }}'如果应用已有品牌化子域,则请求不会改变该标签。仅设置 subdomain 不会将模板迁移任务加入队列。
创建带有渠道设置的 iOS 应用
curl --location 'https://automate.adjust.com/app-automation/app' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My iOS App", "bundle_id": "com.example.myiosapp", "store_id": "123456789", "platform": "ios", "default_device_type": "tablet", "channel_setup": { "facebook": { "app_id": "987654321" }, "google": { "link_id": "google_link_123" } }}'{ "adjust_app_token": "xyz789abc", "name": "My iOS App", "bundle_id": "com.example.myiosapp", "store_id": "123456789", "ticket_token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "sk_app_id": "86372991152"}仅迁移特定部分
curl --location 'https://automate.adjust.com/app-automation/app' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My App", "bundle_id": "com.example.app", "store_id": "com.example.app", "platform": "android", "sections": ["events", "partners", "callbacks"]}'强制更新现有应用
curl --location 'https://automate.adjust.com/app-automation/app' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My App", "bundle_id": "com.example.app", "store_id": "com.example.app", "platform": "android", "force_update": true}'SDK 签名配置
如果您使用 Adjust 签名库来保护 Android 应用流量,那么可以使用 Adjust 自动化 API 来执行签名验证,并管理应用的证书指纹 (android_fingerprints)。
工作原理
您可以通过两种方式管理签名相关设置:
- 模板应用迁移来自
POST /app。使用此流程,从模板应用迁移 Android 证书指纹 (android_fingerprints),并在迁移过程中使用已保存的override_settings.signature。 - 通过
PATCH /app/{app_token}/signature直接进行应用层级更新。使用此流程,无需进行迁移即可更新单个应用的应用级签名设置enforce_signature、enforce_signature_post_install_activities和enforce_signature_post_install_activities_mode。
使用模板应用迁移时,请注意下列事项:
- 模板应用中的所有 有效 证书指纹 (
android_fingerprints) 都会被复制到目标应用中。 - 这两个签名开关均继承自您的模板应用
enforce_signature和安装后签名验证。 - 在已迁移的模板设置之上,还会应用已保存的
override_settings.signature值。 - 无需客户经理的任何操作。该工作流程立即可用。
要了解如何向模板应用添加证书指纹以及启用签名验证,请参阅 SDK 签名设置指南。
覆盖签名设置
使用 override_settings.signature,覆盖模板应用迁移的签名相关设置:
- 如仅需改写安卓证书指纹,请指定
android_fingerprints,它是一个包含fingerprint字段的对象数组。 - 如仅需覆盖安装签名强制设置,请指定
enforce_signature。 - 要控制安装后签名验证,请指定
strict_signature_checking_enabled和strict_signing。将strict_signing的status设置为live、test,或paused。 - 如需覆盖多个签名设置,请将它们同时加入
override_settings.signature。
如果不提供签名覆盖,那么两个开关都将从模板应用继承。
如果您需要在不进行模板迁移的情况下为单个应用更新签名设置,请使用 Signature 终端。
更新签名设置
使用 PATCH /app/{app_token}/signature 终端更新单个应用的签名设置,无需进行模板迁移。变更会立即生效,且响应会返回生成的设置。
终端: https://automate.adjust.com/app-automation/app/{app_token}/signature
方法: PATCH
| 参数 | 数据类型 | 位置 | 必要参数 | 描述 |
|---|---|---|---|---|
app_token | String | Path | 是 | Adjust 应用识别码, |
enforce_signature | Boolean | 正文 (Body) | 否 | 控制安装签名强制执行。 |
enforce_signature_post_install_activities | Boolean | 正文 (Body) | 否 | 控制安装后是否强制执行签名验证。 |
enforce_signature_post_install_activities_mode | String | 正文 (Body) | 否 | 安装后签名模式。其中任一:production,monitoring。启用安装后强制执行且未设置模式时的默认值:production。 |
- 请在请求正文中至少包含一个字段。
- 仅当
enforce_signature_post_install_activities为true或被省略时,您才能发送enforce_signature_post_install_activities_mode。
curl --location --request PATCH 'https://automate.adjust.com/app-automation/app/abc123xyz/signature' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "enforce_signature": true, "enforce_signature_post_install_activities": true, "enforce_signature_post_install_activities_mode": "monitoring"}'{ "enforce_signature": true, "enforce_signature_post_install_activities": true, "enforce_signature_post_install_activities_mode": "monitoring"}示例
从模板应用迁移签名
curl --location 'https://automate.adjust.com/app-automation/app' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My Android App", "bundle_id": "com.example.myapp", "store_id": "com.example.myapp", "platform": "android", "sections": ["signature"], "force_update": true}'仅改写 android_fingerprints
curl --location 'https://automate.adjust.com/app-automation/app' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My Android App", "bundle_id": "com.example.myapp", "store_id": "com.example.myapp", "platform": "android", "sections": ["signature"], "override_settings": { "signature": { "android_fingerprints": [ { "fingerprint": "AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AB" } ] } }}'仅覆盖 enforce_signature
curl --location 'https://automate.adjust.com/app-automation/app' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My Android App", "bundle_id": "com.example.myapp", "store_id": "com.example.myapp", "platform": "android", "sections": ["signature"], "override_settings": { "signature": { "enforce_signature": true } }, "force_update": true}'同时改写 android_fingerprints 和 enforce_signature
curl --location 'https://automate.adjust.com/app-automation/app' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My Android App", "bundle_id": "com.example.myapp", "store_id": "com.example.myapp", "platform": "android", "sections": ["signature"], "override_settings": { "signature": { "android_fingerprints": [ { "fingerprint": "AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AB" }, { "fingerprint": "BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BB:BC" } ], "enforce_signature": true } }, "force_update": true}'更新应用设置
更新现有应用的名称、默认 store ID 或 Bundle ID。您还可以管理保存的 override_settings 以供日后迁移、添加和更新 其他安卓商店,或更改 iOS 设备类型。
- 在不提供
stores或default_device_type的情况下,请提供name,并至少提供store_id或bundle_id之一。 - 使用
stores时,可选用name和override_settings。请勿将stores与顶层store_id或bundle_id结合使用。 - 使用
default_device_type时,name、store_id和bundle_id均为可选项。要更新的平台必须是 iOS。请勿将default_device_type与stores合并。
API 协议
终端: https://automate.adjust.com/app-automation/app/{app_token}
方法: POST
响应: 更新应用响应
参数
| 参数 | 数据类型 | 位置 | 必要参数 | 描述 |
|---|---|---|---|---|
app_token | String | Path | 是 | Adjust 应用识别码, |
name | String | 正文 (Body) | 条件式 | 新显示名称。若同时省略 stores 和 default_device_type,则为必填项。 |
store_id | String | 正文 (Body) | 否 | 默认新商店 ID。 iOS :iTunes Store ID。 安卓 :应用默认商店中的 ID。不允许与 stores 一起使用。 |
bundle_id | String | 正文 (Body) | 否 | iOS 新 Bundle ID。不允许与 stores 一起使用。 |
override_settings | Object | 正文 (Body) | 否 | 更新已保存的覆盖设置,以便将来进行迁移。设置为 null,即可清空所有已保存的覆盖。 |
stores | Object | 正文 (Body) | 否 | 其他需添加或更新的安卓应用商店。保留默认的商店 ID 和 Bundle ID。 |
default_device_type | String | 正文 (Body) | 否 | iOS 设备类型:phone、tablet或""可重置为通用。省略此项可保留当前值。 |
示例
curl --location 'https://automate.adjust.com/app-automation/app/abc123xyz' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My Renamed App", "store_id": "com.example.newapp"}'{ "store_id": "com.example.newapp", "name": "My Renamed App", "ticket_token": "f1e2d3c4-b5a6-7890-1234-567890abcdef"}无需迁移即可添加或更新其他安卓应用商店
curl --location 'https://automate.adjust.com/app-automation/app/abc123xyz' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "stores": { "huawei": { "store_id": "C123456789" }, "galaxy": { "store_id": "com.example.myapp.galaxy" } }}'{ "store_id": "com.example.myapp", "name": "My Android App", "ticket_token": "f1e2d3c4-b5a6-7890-1234-567890abcdef"}会在返回响应之前完成更新。默认商店 ID 和 Bundle ID 将保持不变,也不会将模板迁移加入队列。
将 iOS 设备类型重置为通用
curl --location 'https://automate.adjust.com/app-automation/app/abc123xyz' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "default_device_type": ""}'更新会在响应返回之前完成,且不会将模板迁移加入队列。
清空已保存的覆盖设置
curl --location 'https://automate.adjust.com/app-automation/app/abc123xyz' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "name": "My Renamed App", "store_id": "com.example.newapp", "override_settings": null}'按 store ID 获取应用
使用默认商店 ID 和平台信息调取应用详情。此查询不会搜索 stores 中提供的其他商店 ID。
当多个应用具备相同的默认商店 ID 和平台时,请使用可选的 store 过滤器。如果没有该过滤器,存在歧义的查询将返回错误。如果在使用 store 的情况下查询仍存在歧义,请通过识别码获取应用。
API 协议
终端: https://automate.adjust.com/app-automation/app
方法: GET
响应: 获取应用响应
参数
| 参数 | 数据类型 | 位置 | 必要参数 | 描述 |
|---|---|---|---|---|
store_id | String | 查询 | 是 | 默认应用商店 ID。 iOS :iTunes Store ID。 安卓 :默认应用商店中的 ID。 |
platform | String | 查询 | 是 | 定向平台。其中任一:android,ios, |
store | String | 查询 | 否 | 默认应用商店过滤器,例如 google、huawei、amazon 或 galaxy。iOS 应用请使用 itunes。 |
对于 Google Play,store 过滤值为 google,而不是控制面板商店名称 google_play,该名称用于 stores。
示例
curl --location 'https://automate.adjust.com/app-automation/app?store_id=com.example.myapp&platform=android' \--header 'Authorization: Bearer {your-adjust-api-token}'{ "name": "My Android App", "store_id": "com.example.myapp", "platform": "android", "adjust_app_token": "abc123xyz", "additional_info": { "overrides": {} }, "channel_setup": { "facebook": { "app_id": "123456789" }, "google": { "link_id": "adwords_link_id" } }, "cross_promo_token": "hgj3li1"}按默认应用商店过滤
本示例用于调取默认商店为华为的应用:
curl --location 'https://automate.adjust.com/app-automation/app?store_id=C123456789&platform=android&store=huawei' \--header 'Authorization: Bearer {your-adjust-api-token}'通过识别码获取应用
使用 Adjust 应用识别码调取应用详情。
响应包含一个平台的详细信息。若要选择特定平台,请按商店 ID 和平台查找应用。
API 协议
终端: https://automate.adjust.com/app-automation/app/{app_token}
方法: GET
响应: 获取应用响应
参数
| 参数 | 数据类型 | 位置 | 必要参数 | 描述 |
|---|---|---|---|---|
app_token | String | Path | 是 | Adjust 应用识别码, |
示例
curl --location 'https://automate.adjust.com/app-automation/app/abc123xyz' \--header 'Authorization: Bearer {your-adjust-api-token}'{ "name": "My Android App", "store_id": "com.example.myapp", "platform": "android", "adjust_app_token": "abc123xyz", "additional_info": { "overrides": {} }, "channel_setup": { "facebook": { "app_id": "123456789" } }, "cross_promo_token": "hgj3li1"}列出所有应用
以列表形式调取账户中所有应用。您也可以选择按创建日期过滤。
API 协议
终端: https://automate.adjust.com/app-automation/apps/list
方法: GET
响应 :应用名称识别码对象数组
参数
| 参数 | 数据类型 | 位置 | 必要参数 | 描述 |
|---|---|---|---|---|
start_date | String | 查询 | 否 | 筛选在此日期或之后创建的应用。日期采用 ISO 8601 格式 (例如2024-01-01T00:00:00Z)。 |
end_date | String | 查询 | 否 | 筛选在此日期或之前创建的应用。日期采用 ISO 8601 格式。 |
示例
curl --location 'https://automate.adjust.com/app-automation/apps/list' \--header 'Authorization: Bearer {your-adjust-api-token}'[ { "name": "My Android App", "token": "abc123xyz" }, { "name": "My iOS App", "token": "xyz789abc" }, { "name": "Another App", "token": "def456uvw" }]按日期范围过滤
curl --location 'https://automate.adjust.com/app-automation/apps/list?start_date=2024-01-01T00:00:00Z&end_date=2024-06-30T23:59:59Z' \--header 'Authorization: Bearer {your-adjust-api-token}'数据模型
创建/更新应用负载
查看参数了解应用字段,并查看平台了解各个平台的设置。旧版扁平格式仍受支持。
子域设置
| 参数 | 数据类型 | 描述 |
|---|---|---|
subdomain* | String | 非空白品牌化子域标签。 |
domain | String | 可选。如已包含,则不得留空。 |
其他商店更新
stores 中的每个条目仅接受以下字段:
| 参数 | 数据类型 | 描述 |
|---|---|---|
store_id* | String | 此商店中非空白的应用 ID。 |
应用迁移响应
| 参数 | 数据类型 | 描述 |
|---|---|---|
adjust_app_token* | String | 所有请求的平台共用的应用识别码。 |
name* | String | 应用的显示名称。 |
default_platform* | String | 此次迁移中用于共享设置的平台。 |
platforms* | Object | 所请求的平台,每个平台均包含 store_id 和 bundle_id。 |
ticket_token* | String | 状态终端的 UUID。 |
sk_app_id | String | StoreKit 应用 ID。如不适用,则为 null。 |
旧版请求会返回顶层 store_id 和 bundle_id,而不是 platforms 和 default_platform。
获取应用响应
| 参数 | 数据类型 | 描述 |
|---|---|---|
name* | String | 应用的显示名称。 |
store_id* | String | 应用的默认商店 ID。 |
platform* | String | 定向平台:android 或 ios)。 |
adjust_app_token* | String | Adjust 应用识别码, |
additional_info* | Object | 包括覆盖设置在内的额外应用信息。 |
channel_setup | Object | 合作伙伴特定配置。 |
cross_promo_token | String | 交叉推广链接识别码。 |
更新应用响应
| 参数 | 数据类型 | 描述 |
|---|---|---|
store_id* | String | 默认应用商店 ID。使用 stores 进行更新时将保持不变。 |
name* | String | 更新后的显示名称。 |
ticket_token* | String | 用于跟踪更新作业状态的 UUID。 |
应用名称识别码
| 参数 | 数据类型 | 描述 |
|---|---|---|
name* | String | 应用的显示名称。 |
token* | String | Adjust 应用识别码 |