デバイス
インストールステップとフルマークダウンガイドのセットアップ用質問をコピーしてください。
デバイスは、アップデートメタデータをCapgoに報告する個々のアプリインストールです。デバイス固有のプライベートチャンネルオーバーライドを設定および削除するには、このAPIを使用して、そのメタデータを取得してください。
デバイス情報
デバイスメタデータセクション各レコードには、デバイスID、プラットフォーム、アップデート元とOSバージョン、ネイティブビルド、インストール済みバンドル、生産環境とエミュレーターの状態、カスタムID、チャンネルオーバーライドが含まれることがあります。
利用可能な場合、 country_code は、ISO 3166-1 国名コードの最新の有効な2文字の code を、Cloudflare で処理されたリクエストからデバイスが受け取ったものです。GPS またはアプリが提供する位置情報ではありません。 null 利用できない場合、1台のデバイスでの検索を使用してください。
エンドポイント
セクションのタイトル:エンドポイントPOST
セクションのタイトル:POSThttps://api.capgo.app/device/
デバイス固有のオーバーライドを設定します。 プライベート チャンネルにデバイス固有のオーバーライドを設定するには、そのチャンネルにバンドルを割り当てます。直接デバイスごとのバンドルオーバーライドはサポートされていません。
リクエストボディ
セクションのタイトル:リクエストボディinterface DeviceChannelOverride { app_id: string; // reverse-domain app ID, for example com.example.app device_id: string; channel: string; // existing non-public channel name}例のリクエスト
セクションのタイトル:例のリクエストcurl -X POST \ -H "authorization: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "app_id": "com.example.app", "device_id": "device_456", "channel": "beta" }' \ https://api.capgo.app/device/__CAPGO_KEEP_1__
__CAPGO_KEEP_2__
__CAPGO_KEEP_3__{ "status": "ok"}__CAPGO_KEEP_4__
__CAPGO_KEEP_5__https://api.capgo.app/device/
__CAPGO_KEEP_6__ device_id.
__CAPGO_KEEP_7__
__CAPGO_KEEP_8__app_id__CAPGO_KEEP_9__com.example.app.device_id__CAPGO_KEEP_10__customIdMode: __CAPGO_KEEP_0__ (, __CAPGO_KEEP_1__-, __CAPGO_KEEP_2__)trueを指定すると、空でないcustom_id.cursor: __CAPGO_KEEP_0__ (, __CAPGO_KEEP_1__-, __CAPGO_KEEP_2__) から前のリスト応答の __CAPGO_KEEP_0__ を取得します。limit: __CAPGO_KEEP_0__ (, __CAPGO_KEEP_1__-, __CAPGO_KEEP_2__) 1 ページあたりのデバイス数を指定します。
# Get the first pagecurl -H "authorization: your-api-key" \ "https://api.capgo.app/device/?app_id=com.example.app"
# Get one device, including its request-derived country when availablecurl -H "authorization: your-api-key" \ "https://api.capgo.app/device/?app_id=com.example.app&device_id=device_456"
# Get only devices with a custom IDcurl -H "authorization: your-api-key" \ "https://api.capgo.app/device/?app_id=com.example.app&customIdMode=true"
# Get the next pagecurl -H "authorization: your-api-key" \ "https://api.capgo.app/device/?app_id=com.example.app&cursor=2024-01-01T00:00:00Z%7Cdevice_456"応答のタイプ
「応答のタイプ」セクションinterface DeviceListResponse { data: Device[]; nextCursor?: string; hasMore: boolean;}
interface Device { updated_at: string; device_id: string; custom_id: string; version?: number; version_name: string | null; 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; install_source: string | null; country_code: string | null;}country_code Capgo が有効な Cloudflare-派生の国 code を保持している場合、デバイス固有の検索によって埋められます。有効な国が存在しないリクエストでは、最後に有効な値は保持されず、リスト応答では null __CAPGO_KEEP_0__
__CAPGO_KEEP_1__
__CAPGO_KEEP_2__{ "data": [ { "device_id": "device_456", "custom_id": "test-device-1", "version": 1, "version_name": "1.0.0", "app_id": "com.example.app", "platform": "ios", "plugin_version": "5.0.0", "os_version": "17.0", "version_build": "1", "is_prod": true, "is_emulator": false, "key_id": null, "install_source": null, "country_code": null, "updated_at": "2024-01-01T00:00:00Z" } ], "nextCursor": "2024-01-01T00:00:00Z|device_456", "hasMore": true}__CAPGO_KEEP_4__
__CAPGO_KEEP_5__{ "device_id": "device_456", "custom_id": "test-device-1", "version": 1, "version_name": "1.0.0", "app_id": "com.example.app", "platform": "ios", "plugin_version": "5.0.0", "os_version": "17.0", "version_build": "1", "is_prod": true, "is_emulator": false, "key_id": "MIIB", "install_source": null, "country_code": "FR", "updated_at": "2024-01-01T00:00:00Z", "channel": "beta"}__CAPGO_KEEP_7__
__CAPGO_KEEP_8__https://api.capgo.app/device/
__CAPGO_KEEP_9__
__CAPGO_KEEP_10__
__CAPGO_KEEP_11__interface DeviceOverrideRemoval { app_id: string; device_id: string;}__CAPGO_KEEP_1__の例
__CAPGO_KEEP_2__「__CAPGO_KEEP_1__の例」curl -X DELETE \ -H "authorization: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "app_id": "com.example.app", "device_id": "device_456" }' \ https://api.capgo.app/device/{ "status": "ok"}エラーはHTTPエラー状態とJSONボディを使用して error および message エラー コードの一般的な例は次のとおりです:
invalid_app_idの場合app_id逆ドメイン識別子ではありません。device_not_found未知のデバイスの検索用。channel_not_found要求されたチャネルが存在しない場合。public_channel_overrideデバイスをパブリック チャネルにオーバーライドしようとしている場合。invalid_version_id直接バンドル オーバーライドを試している場合; チャネルを使用してください。cannot_access_app、またはcannot_access_channelAPI キーが必要な権限を満たしていない場合。
一般的な使用例
「一般的な使用例」のセクション-
テスト デバイスをプライベート ベータ チャネルに移動する
{"app_id": "com.example.app","device_id": "device_456","channel": "beta"} -
デバイスを正常チャネル選択にリセット
使用する
DELETEアプリとデバイスIDを含むエンドポイント
__CAPGO_KEEP_0__から続ける
__CAPGO_KEEP_0__セクション__CAPGO_KEEP_1__がCapacitorを使用している場合、__CAPGO_KEEP_1__を使用して __CAPGO_KEEP_2__ __CAPGO_KEEP_2__と__CAPGO_KEEP_3__を接続して、__CAPGO_KEEP_2__の詳細を__CAPGO_KEEP_3__で確認する __CAPGO_KEEP_3__で__CAPGO_KEEP_2__の実装詳細を確認する __CAPGO_KEEP_3__で__CAPGO_KEEP_2__の実装詳細を確認する __CAPGO_KEEP_3__で__CAPGO_KEEP_2__の実装詳細を確認する チャンネルにおける実装詳細について チャンネル チャンネルにおける実装詳細について バーターコンターコングルトショナーコングルトショナ Beta Testing Solutionにおける製品ワークフローについて コングルトショナーコングルトショナターターコングルトショナターターコングルトショナ バーターコングルトショナーコングルトショナターターコングルトショナターターコングルトショナ