Skip to content

チャンネル

チャンネルは、Capgo のアプリケーション更新を管理するための核となるメカニズムです。チャンネルを使用すると、ユーザーが更新を受け取る方法と時期を制御できます。A/B テスト、ステージド ロールアウト、およびプラットフォーム固有の更新などの機能を有効にします。

チャンネルは、アプリケーション更新の配布トラックを表します。各チャンネルは、特定のルールと制約とともに構成できます:

  • バンドル (バージョン) の制御: 指定するバンドル (バージョン) のユーザー
  • プラットフォーム ターゲット: iOS/Android/Electron などの特定のプラットフォームをターゲット
  • Update Policies: Control how updates are delivered
  • Device Restrictions: Manage which devices can access updates
  • public: Set as default channel for new devices
  • disableAutoUpdateUnderNative: Prevent updates when the device’s native app version is newer than the update bundle (version) available in the channel (e.g., device is on native app version 1.2.3, but channel has bundle (version) 1.2.2)
  • disableAutoUpdate: Control update behavior (“major”, “minor”, “version_number”, “none”)
  • ios/android/electron: 参数/給本中心的当前开筐给失败
  • allow_device_self_set: 设置机器认向的类仾
  • allow_emulator: 当前等器机器下览给等器下览给的结算
  • allow_dev: 当前等器机器下览给等器下览给的结算

Best Practices

有类仾的类仾
  1. Testing Channel: 学习类仾的类仾一个一下等器下览给的结算
  2. ステージド ロールアウト: 複数のチャネルを使用して段階的なアップデートの展開
  3. プラットフォーム分離: iOS、Android、Electron などに必要な場合に別々のチャネルを作成
  4. バンドル (バージョン) コントロール: 明確なアップデートパスを確保するために シーケンス バージョニング を使用します

https://api.capgo.app/channel/

チャンネル設定を新規作成または更新します。

type disable_update = "major" | "minor" | "version_number" | "none"
interface ChannelSet {
app_id: string
channel: string
version?: string // bundle (version) name
public?: boolean
disableAutoUpdateUnderNative?: boolean
disableAutoUpdate?: disable_update
ios?: boolean
android?: boolean
electron?: boolean
allow_device_self_set?: boolean
allow_emulator?: boolean
allow_dev?: boolean
}
ターミナル画面
curl -X POST \
-H "authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"app_id": "app_123",
"channel": "beta",
"version": "1.2.0",
"public": false,
"disableAutoUpdate": "minor",
"ios": true,
"android": true,
"electron": true,
"allow_emulator": true
}' \
https://api.capgo.app/channel/
{
"status": "ok"
}

https://api.capgo.app/channel/

チャンネル情報を取得します。1ページあたり50チャンネルを返します。

  • app_id: 必須。アプリのID
  • page: オプション。ページ番号
  • channel: オプション。特定のチャンネル名
ターミナル画面
# Get all channels
curl -H "authorization: your-api-key" \
"https://api.capgo.app/channel/?app_id=app_123"
# Get specific channel
curl -H "authorization: your-api-key" \
"https://api.capgo.app/channel/?app_id=app_123&channel=beta"
# Get next page
curl -H "authorization: your-api-key" \
"https://api.capgo.app/channel/?app_id=app_123&page=1"
interface Channel {
id: number;
created_at: string;
name: string;
app_id: string;
version: { // bundle (version) assigned to the channel
id: number,
name: string
};
created_by: string;
updated_at: string;
public: boolean;
disableAutoUpdateUnderNative: boolean;
disableAutoUpdate: boolean;
allow_emulator: boolean;
allow_dev: boolean;
}

以下のレスポンスに version チャンネルに割り当てられたバンドル(バージョン)を指します。

{
"data": [
{
"id": 1,
"name": "production",
"app_id": "app_123",
"version": {
"id": 1,
"name": "1.0.0"
},
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"created_by": "user_123",
"public": true,
"disableAutoUpdateUnderNative": false,
"disableAutoUpdate": false,
"allow_emulator": false,
"allow_dev": false
}
]
}

https://api.capgo.app/channel/

このチャンネルを使用しているすべてのデバイスに影響を与えるため、チャンネルを削除します。

interface Channel {
channel: string
app_id: string
}
ターミナル画面
curl -X DELETE \
-H "authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"app_id": "app_123",
"channel": "beta"
}' \
https://api.capgo.app/channel/
{
"status": "ok"
}

一般的なエラーシナリオとその応答:

// Channel not found
{
"error": "Channel not found",
"status": "KO"
}
// Invalid bundle (version) format
{
"error": "Invalid version format. Use semantic versioning",
"status": "KO"
}
// Invalid update policy
{
"error": "Invalid disableAutoUpdate value",
"status": "KO"
}
// Permission denied
{
"error": "Insufficient permissions to manage channels",
"status": "KO"
}
  1. ベータテスト
{
"app_id": "app_123",
"channel": "beta",
"version": "1.2.0-beta",
"public": false,
"allow_emulator": true,
"allow_dev": true
}
  1. 運用開始
{
"app_id": "app_123",
"channel": "production",
"version": "1.2.0",
"public": true,
"disableAutoUpdate": "minor"
}
  1. プラットフォーム固有の更新
{
"app_id": "app_123",
"channel": "ios-hotfix",
"version": "1.2.1",
"ios": true,
"android": false
}

Capgoを使用している場合 チャンネル __CAPGO_KEEP_0__ チャンネルルーティングとステージドロールアウトの計画に役立つものとして接続する チャンネル チャンネルの実装詳細について チャンネル チャンネルの実装詳細について ベータテストソリューション ベータテストソリューションの製品ワークフローについて バージョン目標ソリューション Capgo Environment Best Practices: Staging with One Mobile App ID Capgo環境ベストプラクティス:1つのモバイルアプリIDでステージング