您可以使用 /app 终端创建新应用,更新现有应用,并调取应用信息。这是大规模自动化应用管理所依赖的主要终端。
通过模板创建或更新应用
该终端可使用模板应用的设置创建新应用或更新现有应用。这是自动应用设置的主要入口。
工作原理
- 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,可自定义应用的特定设置,而不是使用模板应用的值。覆盖设置将被保存,并自动应用于后续迁移。
{ "override_settings": { "signature": { "android_signature_hash": [ "AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD" ], "enforce_signature": 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}创建带有渠道设置的 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。如果应用标识符在初始设置后发生变化,那么该终端就会非常实用。
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。 |
示例
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"}按 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 应用识别码 |