__CAPGO_KEEP_0__ - ライブ更新用 __CAPGO_KEEP_1__ アプリ

デバイス

デバイスは、Capgoによって管理されるアプリの個々のインストールを表します。デバイス APIを使用すると、デバイス、バンドル(バージョン)、チャネル、および更新状況を追跡および管理できます。

各デバイスには、独自の特性と状態があります:

  • プラットフォーム: iOS、Android、または Electron
  • バンドル (バージョン): 現在のバンドル (バージョン) とネイティブ ビルド バージョン
  • 環境: 製品版または開発用、エミュレータまたは物理デバイス
  • チャネル: 現在の更新チャネル割り当て
  • カスタム ID: 自分のトラッキング用にオプションの識別子

ベスト プラクティス

Section titled “Best Practices”
  1. Bundle (version) Tracking: Monitor device bundle (version) adoption to ensure update uptake
  2. Channel Management: Assign devices to appropriate channels based on testing needs
  3. Environment Awareness: Handle different environments (prod/dev/emulator) appropriately
  4. Custom Identification: Use custom IDs to integrate with your existing systems

https://api.capgo.app/device/

__CAPGO_KEEP_0__を特定のバンドル(バージョン)またはチャネルにリンクする

interface DeviceLink {
app_id: string
device_id: string
version_id?: string // bundle (version) name
channel?: string // channel name
}
ターミナル画面
curl -X POST \
-H "authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"app_id": "app_123",
"device_id": "device_456",
"channel": "beta"
}' \
https://api.capgo.app/device/
{
"status": "ok"
}

https://api.capgo.app/device/

デバイス情報を取得します。大量のデバイスリストの効率的な取得のためにカーソルベースのページネーションを使用します。

  • app_id: 必須。アプリの ID
  • device_id: 任意。特定のデバイス ID を取得する場合のデバイス ID
  • cursor: 任意。前のレスポンスから取得したカーソル
  • limit: 任意。ページあたりのデバイス数 (デフォルト: 50)
ターミナル ウィンドウ
# Get all devices (first page)
curl -H "authorization: your-api-key" \
"https://api.capgo.app/device/?app_id=app_123"
# Get specific device
curl -H "authorization: your-api-key" \
"https://api.capgo.app/device/?app_id=app_123&device_id=device_456"
# Get next page using cursor
curl -H "authorization: your-api-key" \
"https://api.capgo.app/device/?app_id=app_123&cursor=2024-01-01T00:00:00Z|device_456"

__CAPGO_KEEP_1__

__CAPGO_KEEP_2__

__CAPGO_KEEP_3__ device_id __CAPGO_KEEP_0__

interface DeviceListResponse {
data: Device[];
nextCursor?: string; // Pass this as 'cursor' param to get next page
hasMore: boolean; // true if more pages available
}
interface Device {
updated_at: string;
device_id: string;
custom_id: string;
version?: number; // bundle (version) id
version_name: string | null; // bundle (version) name
channel?: string;
app_id: string;
platform: "ios" | "android" | "electron";
plugin_version: string;
os_version: string;
version_build: string;
is_prod: boolean;
is_emulator: boolean;
key_id: string | null; // First 4 chars of encryption key (e.g., "MIIB")
}

__CAPGO_KEEP_2__

__CAPGO_KEEP_4__

__CAPGO_KEEP_0__ device_id __CAPGO_KEEP_5__

interface Device {
updated_at: string;
device_id: string;
custom_id: string;
version?: number; // bundle (version) id
version_name: string | null; // bundle (version) name
channel?: string;
app_id: string;
platform: "ios" | "android" | "electron";
plugin_version: string;
os_version: string;
version_build: string;
is_prod: boolean;
is_emulator: boolean;
key_id: string | null; // First 4 chars of encryption key (e.g., "MIIB")
}
{
"data": [
{
"device_id": "device_456",
"custom_id": "test-device-1",
"version": 1,
"version_name": "1.0.0",
"app_id": "app_123",
"platform": "ios",
"plugin_version": "5.0.0",
"os_version": "17.0",
"version_build": "1",
"is_prod": true,
"is_emulator": false,
"updated_at": "2024-01-01T00:00:00Z"
}
],
"nextCursor": "2024-01-01T00:00:00Z|device_456",
"hasMore": true
}
{
"device_id": "device_456",
"custom_id": "test-device-1",
"version": 1,
"version_name": "1.0.0",
"app_id": "app_123",
"platform": "ios",
"plugin_version": "5.0.0",
"os_version": "17.0",
"version_build": "1",
"is_prod": true,
"is_emulator": false,
"updated_at": "2024-01-01T00:00:00Z",
"channel": "production"
}

https://api.capgo.app/device/

デバイスをチャンネルオーバーライドから分離する。デバイスをデフォルトのチャンネルにリセットします。

クエリパラメータ

クリップボードにコピー
interface Device {
device_id: string
app_id: string
}

セクション「サンプルリクエスト」

ターミナル画面
クリップボードにコピー
curl -X DELETE \
-H "authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"app_id": "app_123",
"device_id": "device_456"
}' \
https://api.capgo.app/device/

セクション「成功レスポンス」

クリップボードにコピー
{
"status": "ok"
}

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

// Device not found
{
"error": "Device not found",
"status": "KO"
}
// Invalid bundle (version)
{
"error": "Version not found",
"status": "KO"
}
// Invalid channel
{
"error": "Channel not found",
"status": "KO"
}
// Permission denied
{
"error": "Insufficient permissions to manage devices",
"status": "KO"
}
  1. ベータデバイス登録
{
"app_id": "app_123",
"device_id": "device_456",
"channel": "beta"
}
  1. バージョンオーバーライド
{
"app_id": "app_123",
"device_id": "device_456",
"version_id": "1.1.0"
}
  1. デフォルトチャンネルにリセット
// Use DELETE endpoint to remove overrides

デバイス管理に関するヒント

デバイス管理のためのヒント
  1. 監視: デバイスの状態とバンドル(バージョン)の配布を定期的に確認する
  2. テスト: テストデバイスを簡単に識別できるようにカスタムIDを使用する
  3. トラブルシューティング: デバイスの更新とチャンネル割り当てを追跡する
  4. ネイティブバージョン管理: ネイティブアプリのバージョンを互換性を確保するために監視する

デバイスから続ける

デバイスから続ける

Capgoを使用している場合 デバイス __CAPGO_KEEP_0__を計画チャンネルルーティングとステージドロールアウトに接続する チャンネル __CAPGO_KEEP_1__の実装詳細については、チャンネル __CAPGO_KEEP_1__の実装詳細については、チャンネル __CAPGO_KEEP_1__の実装詳細については、チャンネル ベータテストソリューション __CAPGO_KEEP_2__の製品ワークフローについては、ベータテストソリューション バージョン目標ソリューション __CAPGO_KEEP_2__の製品ワークフローについては、バージョン目標ソリューション __CAPGO_KEEP_0__ __CAPGO_KEEP_1__