채널
채널은 Capgo에서 앱 업데이트를 관리하는 핵심 메커니즘입니다. A/B 테스팅, 단계적 출시 및 플랫폼별 업데이트와 같은 기능을 활성화하면서 사용자가 업데이트를 받는 방법과 시기를 제어할 수 있습니다.
채널 이해하기
Section titled “채널 이해하기”채널은 앱 업데이트의 배포 트랙을 나타냅니다. 각 채널은 특정 규칙과 제약 조건으로 구성될 수 있습니다:
- 버전 제어: 사용자가 받는 버전 지정
- 플랫폼 타겟팅: 특정 플랫폼(iOS/Android) 타겟
- 업데이트 정책: 업데이트 전달 방식 제어
- 장치 제한: 업데이트에 액세스할 수 있는 장치 관리
채널 구성 옵션
Section titled “채널 구성 옵션”- public: 새 장치의 기본 채널로 설정
- disableAutoUpdateUnderNative: 장치의 네이티브 앱 버전이 채널에서 사용 가능한 업데이트 버전보다 최신인 경우 업데이트 방지(예: 장치가 버전 1.2.3이지만 채널에 1.2.2가 있음)
- disableAutoUpdate: 업데이트 동작 제어(“major”, “minor”, “version_number”, “none”)
- ios/android: 특정 플랫폼에 대해 활성화/비활성화
- allow_device_self_set: 장치가 자체 채널을 선택하도록 허용
- allow_emulator: 에뮬레이터 장치에서 업데이트 허용
- allow_dev: 개발 빌드에서 업데이트 허용
- 테스트 채널: 내부 검증을 위한 테스트 채널 유지
- 단계적 출시: 점진적 업데이트 배포를 위해 여러 채널 사용
- 플랫폼 분리: 필요시 iOS와 Android용 별도 채널 생성
- 버전 제어: 명확한 업데이트 경로를 위해 시맨틱 버전 관리 사용
https://api.capgo.app/channel/
채널 구성을 생성하거나 업데이트합니다.
Request Body
Section titled “Request Body”type disable_update = "major" | "minor" | "version_number" | "none"interface ChannelSet { app_id: string channel: string version?: string public?: boolean disableAutoUpdateUnderNative?: boolean disableAutoUpdate?: disable_update ios?: boolean android?: boolean allow_device_self_set?: boolean allow_emulator?: boolean allow_dev?: boolean}curl -X POST \ -H "authorization: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "app_id": "app_123", "channel": "beta", "version": "1.2.0", "public": false, "disableAutoUpdate": "minor", "ios": true, "android": true, "allow_emulator": true }' \ https://api.capgo.app/channel/{ "status": "ok"}https://api.capgo.app/channel/
채널 정보를 검색합니다. 페이지당 50개의 채널을 반환합니다.
쿼리 매개변수
Section titled “쿼리 매개변수”app_id: 필수. 앱의 IDpage: 선택사항. 페이지네이션을 위한 페이지 번호channel: 선택사항. 검색할 특정 채널 이름
# 모든 채널 가져오기curl -H "authorization: your-api-key" \ "https://api.capgo.app/channel/?app_id=app_123"
# 특정 채널 가져오기curl -H "authorization: your-api-key" \ "https://api.capgo.app/channel/?app_id=app_123&channel=beta"
# 다음 페이지 가져오기curl -H "authorization: your-api-key" \ "https://api.capgo.app/channel/?app_id=app_123&page=1"interface Channel { id: number; created_at: string; name: string; app_id: string; version: { id: number, name: string }; created_by: string; updated_at: string; public: boolean; disableAutoUpdateUnderNative: boolean; disableAutoUpdate: boolean; allow_emulator: boolean; allow_dev: boolean;}{ "data": [ { "id": 1, "name": "production", "app_id": "app_123", "version": { "id": 1, "name": "1.0.0" }, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "created_by": "user_123", "public": true, "disableAutoUpdateUnderNative": false, "disableAutoUpdate": false, "allow_emulator": false, "allow_dev": false } ]}DELETE
Section titled “DELETE”https://api.capgo.app/channel/
채널을 삭제합니다. 이는 이 채널을 사용하는 모든 장치에 영향을 미칩니다.
쿼리 매개변수
Section titled “쿼리 매개변수”interface Channel { channel: string app_id: string}curl -X DELETE \ -H "authorization: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "app_id": "app_123", "channel": "beta" }' \ https://api.capgo.app/channel/{ "status": "ok"}일반적인 오류 시나리오 및 응답:
// 채널을 찾을 수 없음{ "error": "Channel not found", "status": "KO"}
// 잘못된 버전 형식{ "error": "Invalid version format. Use semantic versioning", "status": "KO"}
// 잘못된 업데이트 정책{ "error": "Invalid disableAutoUpdate value", "status": "KO"}
// 권한 거부{ "error": "Insufficient permissions to manage channels", "status": "KO"}일반적인 사용 사례
Section titled “일반적인 사용 사례”- 베타 테스팅
{ "app_id": "app_123", "channel": "beta", "version": "1.2.0-beta", "public": false, "allow_emulator": true, "allow_dev": true}- 프로덕션 출시
{ "app_id": "app_123", "channel": "production", "version": "1.2.0", "public": true, "disableAutoUpdate": "minor"}- 플랫폼별 업데이트
{ "app_id": "app_123", "channel": "ios-hotfix", "version": "1.2.1", "ios": true, "android": false}