__CAPGO_KEEP_1__
__CAPGO_KEEP_0__ 설치 단계와 이 플러그인의 전체 마크다운 가이드가 포함된 설정 지시 복사하기
Capgo에서 관리하는 앱의 개별 설치를 나타내는 기기입니다. 기기 API은 기기(버전, 채널 및 업데이트 상태)를 추적하고 관리할 수 있도록 합니다.
기기 이해
기기 이해각 기기는 고유한 특성과 상태를 가지고 있습니다.
- 플랫폼: iOS, Android 또는 Electron
- 버전 번들 (버전): 현재 번들 (버전)과 네이티브 빌드 버전
- 환경: 운영 또는 개발, 에뮬레이터 또는 물리 장치
- 채널: 현재 업데이트 채널 assignments
- 사용자 지정 ID: 사용자 지정 추적 목적을 위한 옵션 식별자
최선의 방법
“최선의 방법” 제목의 섹션- 버전 번들 (버전) 추적: 장치 버전 번들 (버전) 수용을 보장하기 위해 업데이트 수용을 모니터링
- 채널 관리: 테스트 목적에 따라 장치를 적절한 채널에 할당합니다.
- 환경 인식: 프로덕션, 개발, 에뮬레이터 환경을 적절히 처리합니다.
- 고유 식별: 기존 시스템과 통합하기 위해 고유한 ID를 사용합니다.
엔드포인트
엔드포인트POST
POSThttps://api.capgo.app/device/
특정 버전 또는 채널에 장치를 연결합니다.
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/
장치 정보를 가져옵니다. 커서 기반 페이징을 사용하여 대형 장치 목록의 효율적인 검색을 지원합니다.
Query Parameters
Query Parameters 섹션app_id: 필수. 앱 IDdevice_id: 선택. 단일 기기 ID를 가져올 때 사용하는 특정 기기 IDcursor: 선택. 이전 응답에서 가져온 커서limit: 선택. 페이지당 기기 수 (기본값: 50)
예제 요청
예제 요청 섹션# Get all devices (first page)curl -H "authorization: your-api-key" \ "https://api.capgo.app/device/?app_id=app_123"
# Get specific devicecurl -H "authorization: your-api-key" \ "https://api.capgo.app/device/?app_id=app_123&device_id=device_456"
# Get next page using cursorcurl -H "authorization: your-api-key" \ "https://api.capgo.app/device/?app_id=app_123&cursor=2024-01-01T00:00:00Z|device_456"리스트 형식 응답
리스트 형식 응답 섹션__CAPGO_KEEP_0__ (여러 기기 요청 시 (no 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_2__ 제목 ‘__CAPGO_KEEP_2__ (단일 기기 요청)’__CAPGO_KEEP_0__ (특정 기기 요청 시 device_id __CAPGO_KEEP_0__ 매개 변수, 기기 객체를 직접 반환합니다.:
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_2__ 제목 ‘__CAPGO_KEEP_2__ (목록 예시)’{ "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}__CAPGO_KEEP_2__ (단일 기기 예시)
__CAPGO_KEEP_0__{ "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/
__CAPGO_KEEP_0__에서 장치와 채널 오버라이드의 연결을 끊습니다. 이로 인해 장치가 기본 채널을 사용하도록 다시 설정됩니다.
Query Parameters
__CAPGO_KEEP_0__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"}일반적인 사용 사례
일반적인 사용 사례- 베타 장치 등록
{ "app_id": "app_123", "device_id": "device_456", "channel": "beta"}- 버전 오버라이드
{ "app_id": "app_123", "device_id": "device_456", "version_id": "1.1.0"}- 기본 채널으로 초기화
// Use DELETE endpoint to remove overrides장치 관리 팁
장치 관리 팁- 모니터링장치 상태 및 버전 배포를 정기적으로 확인하십시오.
- 테스트: 사용자 지정 ID를 사용하여 테스트 장치를 쉽게 식별하세요
- 문제 해결: 장치 업데이트와 채널 할당을 추적하세요
- 네이티브 버전 관리: 네이티브 앱 버전을 확인하여 호환성을 보장하세요
장치에서 계속
: 장치에서 계속이 경우 장치 채널 라우팅과 스테이지드 롤아웃을 계획하기 위해 사용하는 경우 Channels __CAPGO_KEEP_0__ 채널의 구현 세부 정보에 대해 채널 __CAPGO_KEEP_0__ 채널의 구현 세부 정보에 대해 채널 __CAPGO_KEEP_0__ 채널의 구현 세부 정보에 대해 채널 베타 테스트 솔루션 __CAPGO_KEEP_0__ 베타 테스트 솔루션의 제품 워크플로에 대해, 그리고 버전 대상 솔루션