メインコンテンツにジャンプ

デバイス

デバイスは、アップデートメタデータをCapgoに報告する個々のアプリインストールです。デバイス固有のプライベートチャンネルオーバーライドを設定および削除するには、このAPIを使用して、そのメタデータを取得してください。

各レコードには、デバイスID、プラットフォーム、アップデート元とOSバージョン、ネイティブビルド、インストール済みバンドル、生産環境とエミュレーターの状態、カスタムID、チャンネルオーバーライドが含まれることがあります。

利用可能な場合、 country_code は、ISO 3166-1 国名コードの最新の有効な2文字の code を、Cloudflare で処理されたリクエストからデバイスが受け取ったものです。GPS またはアプリが提供する位置情報ではありません。 null 利用できない場合、1台のデバイスでの検索を使用してください。

https://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 page
curl -H "authorization: your-api-key" \
"https://api.capgo.app/device/?app_id=com.example.app"
# Get one device, including its request-derived country when available
curl -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 ID
curl -H "authorization: your-api-key" \
"https://api.capgo.app/device/?app_id=com.example.app&customIdMode=true"
# Get the next page
curl -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;
}
ターミナル画面
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_channel API キーが必要な権限を満たしていない場合。
  1. テスト デバイスをプライベート ベータ チャネルに移動する

    {
    "app_id": "com.example.app",
    "device_id": "device_456",
    "channel": "beta"
    }
  2. デバイスを正常チャネル選択にリセット

    使用する 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における製品ワークフローについて コングルトショナーコングルトショナターターコングルトショナターターコングルトショナ バーターコングルトショナーコングルトショナターターコングルトショナターターコングルトショナ