__CAPGO_KEEP_0__

장치

장치(Devices)는 Capgo에 업데이터 메타데이터를 보고합니다. 이 API을 사용하여 그 메타데이터를 가져오거나 장치별 사설 채널 오버라이드 설정 및 제거를 하세요.

장치 메타데이터

장치 메타데이터 섹션

각 레코드에는 장치 ID, 플랫폼, 업데이터 및 OS 버전, 네이티브 빌드, 설치된 번들, 프로덕션 및 에뮬레이터 상태, 커스텀 ID 및 채널 오버라이드가 포함될 수 있습니다.

가능한 경우 country_code code은 장치에서 Cloudflare-처리된 요청으로부터 받은 최신 유효한 두 개의 문자 ISO 3166-1 국가 code입니다. GPS 또는 앱에서 제공하는 위치 값이 아닙니다. 사용할 수 없는 경우 null __CAPGO_KEEP_0__을 사용할 수 없을 때 단일 장치 조회를 사용하세요.

엔드포인트

Endpoints

POST

POST

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

장치에 대한 특정 오버라이드 설정 개인 장치에 대한 버전을 선택하기 위해 채널에 버블을 할당하세요. 직접 장치에 대한 버블 오버라이드 지원은 없습니다. 오버라이드가 마지막으로 쓰인 후 90일이 지나면 만료됩니다. 다시 POST를 하시면 만료되지 않습니다.

Request Body

복사
interface DeviceChannelOverride {
app_id: string; // reverse-domain app ID, for example com.example.app
device_id: string;
channel: string; // existing non-public channel name
}

예시 요청

터미널 창
__CAPGO_KEEP_0__
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/

공개 채널은 장치 오버라이드로 사용할 수 없습니다.

{
"status": "ok"
}

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

장치 메타데이터를 가져옵니다. omit할 경우 결과는 커서 페이지네이션됩니다. device_id.

쿼리 매개변수

쿼리 매개변수 섹션
  • app_id: 반드시 역 도메인 앱 ID와 같은 com.example.app.
  • device_id: 장치 ID가 포함되어 있으면 응답은 단일 장치 rather than 페이지네이션된 목록입니다.
  • customIdMode: 옵션 boolean. __CAPGO_KEEP_0__을 true 만들기 위해 custom_id.
  • cursor: 이전 목록 응답에서 가져온 옵션 커서.
  • limit: 페이지당 기기 수를 지정하는 옵션 숫자.
터미널 창
# 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가 있는 경우 기기별로 Capgo이 채워집니다. 유효한 국가가 없는 요청은 마지막 유효한 값을 지우지 않습니다; 목록 응답은 null 이 필드에 대한 설명입니다.

예시 응답 (목록)

예시 응답 (목록) 섹션
{
"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
}

예시 응답 (단일 장치)

예시 응답 (단일 장치) 섹션
{
"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"
}

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

요청 본문 또는 쿼리 매개변수

요청 본문 또는 쿼리 매개변수 섹션

protectedTokens
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. 기기 채널 선택을 일반으로 다시 설정

    앱과 기기 ID가 포함된 DELETE 엔드포인트를 사용하세요.

기기에서 계속 진행

기기에서 계속 진행 섹션

채널 라우팅과 스테이지드 롤아웃을 계획하고 있는 경우 Channels Channels Channels Channels Channels 채널의 구현 세부 정보에 대해 채널 페이지/영역: Capgo 솔루션 마케팅 페이지. 역할: 짧은 UI 레이블 또는 네비게이션 아이템. 채널의 구현 세부 정보에 대해 베타 테스트 솔루션 채널의 구현 세부 정보에 대해 베타 테스트 솔루션의 제품 워크플로에 대해