您可以使用 /app 终端创建新应用,更新现有应用,并调取应用信息。这是大规模自动化应用管理所依赖的主要终端。
通过识别码获取应用、通过商店 ID 获取应用以及列出所有应用等 检索 操作仅返回 通过该 API 创建或更新的 应用。要使用您账户中的任何应用 (包括在控制面板中创建的应用),请使用应用设置终端。
通过模板创建或更新应用
该终端可使用模板应用的设置创建新应用或更新现有应用。这是自动应用设置的主要入口。
工作原理
- API 会查找与
store_id和platform匹配的现有应用。 - 如果无法找到匹配应用,则会使用提供的详细信息创建新应用。
- 复制模板应用设置的后台作业加入队列。
- 响应中包含用于跟踪迁移进度的
ticket_token。
下列任一条件满足时,后台作业就会触发:
- 新建应用
channel_setup、override_settings、editors或ios_pv_shared_secrets字段被更新force_update设置为true
API 协议
终端: https://automate.adjust.com/app-automation/app
方法: POST
请求正文: 创建/更新应用负载
响应: 应用迁移响应
参数
| 参数 | 数据类型 | 必要参数 | 描述 |
|---|---|---|---|
store_id | String | 是 | iOS 应用 :iTunes Store ID (数字)。 Android 应用 :Bundle ID (例如 com.example.app)。 |
platform | String | 是 | 定向平台。其中任一:android,ios, |
bundle_id | String | 是 | 应用的 Bundle ID (例如 com.example.app)。 |
name | String | 是 | 应用的显示名称。 |
template_app_token | String | 否 | 应用识别码,用于从中复制设置。如未提供,则使用您在账户中配置的识别码。 |
sections | Array[String] | 否 | 要迁移的应用版块列表。如果为空,则迁移所有部分。 |
force_update | Boolean | 否 | 设置为 true 时,即使应用未发生变更,也会强制执行迁移。默认设置为 false。 |
channel_setup | Object | 否 | 合作伙伴特定配置。请参阅渠道设置了解详情。 |
override_settings | Object | 否 | 要覆盖的、来自模板应用的设置。请参阅覆盖设置了解详情。 |
editors | Array[String] | 否 | 应拥有应用访问权限的自定义用户电邮列表。管理员、编辑和读者角色用户会自动获得访问权限。 |
ios_pv_shared_secret | String | 否 | 应用的 iOS 收入验证共享密钥。 |
verification | Boolean | 否 | 设置为 true 以验证 iOS 应用。仅适用于已为账户启用验证的 iOS 应用。默认设置为 false。 |
Section
使用 sections 参数,可仅迁移特定设置:
{ "sections": ["partners", "events", "fraud_prevention_settings"]}要查看完整的可用部分列表,请参阅应用部分。
覆盖设置
使用 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是应用事件名称到合作伙伴事件名称的映射。app_info是只读部分,在override_settings中不受支持。channel_setup值,来自请求级别channel_setup字段,具有最高优先级。- 如果请求级别
channel_setup中缺少密钥,应用自动化将回溯至已存储应用channel_setup。 override_settings.partners[].channel_setup用于额外的后备来源。
{ "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" } } ] }}示例
创建新的 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}创建带有渠道设置的 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", "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_signature_hash)。
工作原理
签名配置会通过模板应用方法处理:
- 模板应用中的所有 有效 证书指纹 (
android_signature_hash) 都会被复制到目标应用中。 - 模板应用中的
enforce_signature设置也会复制到目标应用。 - 配置立即可用,无需客户经理进行任何操作。
要了解如何向模板应用添加证书指纹以及启用签名验证,请参阅 SDK 签名设置指南。
覆盖签名设置
您可以使用 override_settings 字段覆盖目标应用的 android_signature_hash 和/或 enforce_signature:
- 如仅需覆盖 Android 签名哈希,请在
override_settings中指定android_signature_hash。 - 如仅需覆盖强制设置,请在
override_settings中指定enforce_signature。 - 要覆盖这两个字段,请将两个字段都包含在
override_settings中。
示例
从模板应用迁移签名
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_signature_hash
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_signature_hash": [ "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_signature_hash 和 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_signature_hash": [ "AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AB", "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,以便将来进行迁移。
API 协议
终端: https://automate.adjust.com/app-automation/app/{app_token}
方法: POST
响应: 更新应用响应
参数
| 参数 | 数据类型 | 位置 | 必要参数 | 描述 |
|---|---|---|---|---|
app_token | String | Path | 是 | Adjust 应用识别码, |
name | String | 正文 (Body) | 是 | 应用的新显示名称。 |
store_id | String | 正文 (Body) | 否 | 新 store ID。 iOS :iTunes Store ID。 Android :Bundle ID。 |
bundle_id | String | 正文 (Body) | 否 | 新 Bundle ID。 |
override_settings | Object | 正文 (Body) | 否 | 更新已保存的覆盖设置,以便将来进行迁移。设置为 null,即可清空所有已保存的覆盖。 |
示例
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 '{ "name": "My Renamed App", "store_id": "com.example.newapp", "override_settings": null}'按 store ID 获取应用
使用 store ID 和平台信息调取应用详情。
API 协议
终端: https://automate.adjust.com/app-automation/app
方法: GET
响应: 获取应用响应
参数
| 参数 | 数据类型 | 位置 | 必要参数 | 描述 |
|---|---|---|---|---|
store_id | String | 查询 | 是 | iOS :iTunes Store ID。 Android :Bundle ID。 |
platform | String | 查询 | 是 | 定向平台。其中任一:android,ios, |
示例
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"}通过识别码获取应用
使用 Adjust 应用识别码调取应用详情。
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}'数据模型
创建/更新应用负载
| 参数 | 数据类型 | 描述 |
|---|---|---|
store_id* | String | iOS 应用 :iTunes Store ID。 Android 应用 :Bundle ID。 |
platform* | String | 定向平台。其中任一:android,ios, |
bundle_id* | String | 应用的 Bundle ID。 |
name* | String | 应用的显示名称。 |
template_app_token | String | 应用识别码,用于从中复制设置。如果未提供,则使用已配置的默认值。 |
sections | Array[String] | 要迁移的应用部分。如果未提供,则迁移所有部分。 |
force_update | Boolean | 即使应用未发生变更,也会强制执行迁移。默认为 false。 |
channel_setup | Object | 合作伙伴特定配置。请参阅渠道设置。 |
override_settings | Object | 要覆盖的、来自模板应用的设置。 |
editors | Array[String] | 应拥有应用访问权限的用户电邮列表。 |
ios_pv_shared_secret | String | iOS 收入验证共享密钥。 |
verification | Boolean | 是否验证 iOS 应用。默认为 false。 |
应用迁移响应
| 参数 | 数据类型 | 描述 |
|---|---|---|
adjust_app_token* | String | 已创建/更新应用的 Adjust 应用识别码。 |
name* | String | 应用的显示名称。 |
bundle_id* | String | 应用的 Bundle ID。 |
store_id* | String | 应用的 Store ID。 |
ticket_token* | String | 用于跟踪迁移任务状态的 UUID。与状态终端配合使用。 |
sk_app_id | String | 经过验证的 iOS 应用的 StoreKit 应用 ID。如不适用,则为 null。 |
获取应用响应
| 参数 | 数据类型 | 描述 |
|---|---|---|
name* | String | 应用的显示名称。 |
store_id* | String | 应用的 Store ID。 |
platform* | String | 定向平台:android 或 ios)。 |
adjust_app_token* | String | Adjust 应用识别码, |
additional_info* | Object | 包括覆盖设置在内的额外应用信息。 |
channel_setup | Object | 合作伙伴特定配置。 |
cross_promo_token | String | 交叉推广链接识别码。 |
更新应用响应
| 参数 | 数据类型 | 描述 |
|---|---|---|
store_id* | String | 更新后的 store ID。 |
name* | String | 更新后的显示名称。 |
ticket_token* | String | 用于跟踪更新作业状态的 UUID。 |
应用名称识别码
| 参数 | 数据类型 | 描述 |
|---|---|---|
name* | String | 应用的显示名称。 |
token* | String | Adjust 应用识别码 |