장치
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 프롬프트를 복사하세요.
장치들은 Capgo에 의해 관리되는 앱의 개별 설치를 나타냅니다. 장치 API은 장치의 버전, 채널, 업데이트 상태를 포함하여 장치의 추적 및 관리를 허용합니다.
장치
장치각 기기는 고유한 특성과 상태를 가지고 있습니다:
- 플랫폼: iOS, Android 또는 Electron
- 배포본 (버전): 현재 배포본 (버전) 및 네이티브 빌드 버전
- 환경: 운영 또는 개발, 에뮬레이터 또는 물리 기기
- 채널: 현재 업데이트 채널 assignments
- 사용자 정의 ID: 사용자 정의 추적 목적을 위한 옵션 식별자
Best Practices
Section titled “Best Practices”- Bundle (version) Tracking: 기기 버전 추적을 통해 업데이트 수용을 보장하세요
- Channel Management: 테스트 필요에 따라 기기를 적절한 채널에 할당하세요
- Environment Awareness: 프로덕션/개발/에뮬레이터 환경에 따라 적절히 처리하세요
- Custom Identification: 기존 시스템과 통합하기 위해 사용자 정의 ID를 사용하세요
Endpoints
Section titled “Endpoints”POST
POSThttps://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"}GET
GET 섹션https://api.capgo.app/device/
장치 정보를 가져옵니다. 커서 기반 페이징을 사용하여 대형 장치 목록의 효율적인 가져오기를 지원합니다.
Query Parameters
Query Parameters 섹션app_id: 필수. 앱의 IDdevice_id: 선택적. 단일 장치를 가져올 때 특정 장치 IDcursor: 선택적. 이전 응답에서 가져온 커서limit: 선택적. 페이지당 장치 수 (기본값: 50)
Example Requests
예제 요청# 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_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_5__
__CAPGO_KEEP_6____CAPGO_KEEP_7__ device_id __CAPGO_KEEP_8__
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_10__
예시 응답 (목록){ "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/
기기 삭제
Query Parameters
__CAPGO_KEEP_1__interface Device { device_id: string app_id: string}__CAPGO_KEEP_3__
__CAPGO_KEEP_4__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/__CAPGO_KEEP_7__
__CAPGO_KEEP_8__{ "status": "ok"}__CAPGO_KEEP_10__
에러 처리일반 오류 상황 및 응답:
// 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"}일반 사용 사례
사용 사례- Beta 장치 등록
{ "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를 사용하세요
- 문제 해결: 장치 업데이트 및 채널 assignments를 추적하세요
- 자연어 버전 관리: 네이티브 앱 버전을 확인하여 호환성을 유지하세요
장치에서 계속
장치에서 계속: 장치에서 계속하기 기기 __CAPGO_KEEP_0__을 연결하여 채널 라우팅 및 단계별 롤아웃을 계획하세요. 채널 채널에 대한 구현 세부 정보를 참조하세요. 채널 채널에 대한 구현 세부 정보를 참조하세요. 채널 채널에 대한 구현 세부 정보를 참조하세요. 베타 테스트 솔루션 베타 테스트 솔루션의 제품 워크플로우를 참조하세요. 버전 대상 솔루션 버전 대상 솔루션의 제품 워크플로우를 참조하세요.