コンテンツにスキップ

チャンネル

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

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

  • バンドル(バージョン)制御: 指定されたバンドル(バージョン)のユーザーを受け取る
  • プラットフォームターゲット: iOS/Android/Electronなどの特定のプラットフォームをターゲットにする
  • アップデートポリシー:アップデートの配信方法を制御します
  • デバイス制限:アップデートにアクセスできるデバイスを管理します
  • public:新しいデバイスのデフォルトチャネルとして設定します
  • disableAutoUpdateUnderNative:デバイスのネイティブアプリのバージョンがアップデートパッケージのバージョンよりも新しい場合にアップデートを防止します (例:デバイスのネイティブアプリバージョンは 1.2.3 ですが、チャネルにはバージョン 1.2.2 のアップデートパッケージが含まれています)
  • disableAutoUpdate:アップデートの動作を制御します (“メジャー”, “マイナー”, “バージョン番号”, “なし”)
  • ios/android/electron: 参数/愛本の中心を巹いできだ
  • allow_device_self_set: 試东を指安できだ
  • allow_emulator: 試东を安丛できだ
  • allow_dev: 安丛を安丛できだ
  1. Testing Channel: 安丛を正廧に安丛した。
  2. ステージド ロールアウト: 複数のチャネルを使用して、段階的なアップデートの展開
  3. プラットフォーム分離: iOS、Android、Electron の場合に必要な場合に、別々のチャネルを作成
  4. バンドル (バージョン) コントロール: 明確なアップデートパスのために、 シーケンス バージョニング エンドポイント

セクションのタイトル “エンドポイント”

POST

セクションのタイトル “POST”

__CAPGO_KEEP_0__

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

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

Request Body

「Request Body」
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"

Response Type

Response Type
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
}
]
}

DELETE

DELETE

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__環境ベストプラクティス:1つのモバイルアプリIDでステージング __CAPGO_KEEP_0__環境ベストプラクティス:1つのモバイルアプリIDでステージング Capgo Environment Best Practices: Staging with One Mobile App ID for the practical context in Capgo Environment Best Practices: Staging with One Mobile App ID.