채널
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 지시를 복사하세요.
채널은 Capgo 앱 업데이트를 관리하는 핵심 메커니즘입니다. 채널을 통해 사용자가 업데이트를 언제 받을지, 어떤 업데이트를 받을지 제어할 수 있습니다. A/B 테스트, 단계별 출시, 플랫폼별 업데이트와 같은 기능을 활성화할 수 있습니다.
배포 패키지(버전) 관리
- : 사용자가 받을 배포 패키지(버전) 지정플랫폼 대상 설정
- : iOS/Android/Electron과 같은 특정 플랫폼을 대상으로 설정업데이트 정책
- : 업데이트가 전달되는 방식을 제어장치 제한
- : 업데이트에 접근할 수 있는 장치를 관리Understanding Channels
채널 설정 옵션
채널 설정 옵션 섹션- 공개: 새로운 장치에 대한 기본 채널 설정
- : 장치의 네이티브 앱 버전이 업데이트된 채널 버전보다 최신일 때 업데이트를 방지합니다 (예: 장치가 네이티브 앱 버전 1.2.3을 사용하고 있지만 채널에 업데이트된 버전 1.2.2이 있습니다): 업데이트 동작을 제어합니다 (‘major’, ‘minor’, ‘버전 번호’, ‘none’)
- : 특정 플랫폼을 위한 사용/비사용: ios, android, electron
- : 장치가 채널을 선택할 수 있도록 허용: 장치가 채널을 선택할 수 있도록 허용
- : 장치가 채널을 선택할 수 있도록 허용: 장치가 채널을 선택할 수 있도록 허용
- __CAPGO_KEEP_0____CAPGO_KEEP_1__
- : 개발자 모드에서 업데이트를 허용합니다.: 개발 버전에서 업데이트를 허용합니다.
: 개발 및 배포를 위한 최적의 방법
: 내부 검증을 위한 테스트 채널 유지- : 여러 채널을 통해 점진적인 업데이트를 배포합니다.: iOS, Android, Electron 등 필요 시 별도의 채널을 생성합니다.
- __CAPGO_KEEP_2____CAPGO_KEEP_3__
- __CAPGO_KEEP_4____CAPGO_KEEP_5__
- 버전 제어 (버전): 명확한 업데이트 경로를 위해 시맨틱 버전을 사용하십시오.
엔드포인트
엔드포인트POST
POSThttps://api.capgo.app/channel/
채널 구성 설정을 생성하거나 업데이트하십시오.
요청 본문
요청 본문type disable_update = "major" | "minor" | "version_number" | "none"interface ChannelSet { app_id: string channel: string version?: string // bundle (version) name public?: boolean disableAutoUpdateUnderNative?: boolean disableAutoUpdate?: disable_update ios?: boolean android?: boolean electron?: 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, "electron": true, "allow_emulator": true }' \ https://api.capgo.app/channel/성공 응답
성공 응답 섹션{ "status": "ok"}GET
GET 섹션https://api.capgo.app/channel/
채널 정보를 가져옵니다. 1페이지당 50개의 채널을 반환합니다.
쿼리 매개변수
섹션 제목 “쿼리 매개변수”app_id필수. 앱 IDpage선택. 페이지 번호(페이징)channel: 옵션. 특정 채널 이름을 검색하기 위해
예제 요청
예제 요청 섹션# Get all channelscurl -H "authorization: your-api-key" \ "https://api.capgo.app/channel/?app_id=app_123"
# Get specific channelcurl -H "authorization: your-api-key" \ "https://api.capgo.app/channel/?app_id=app_123&channel=beta"
# Get next pagecurl -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: { // bundle (version) assigned to the channel id: number, name: string }; created_by: string; updated_at: string; public: boolean; disableAutoUpdateUnderNative: boolean; disableAutoUpdate: boolean; allow_emulator: boolean; allow_dev: boolean;}아래의 응답에서 version 채널에 할당된 버전(버전)을 참조합니다.
예제 응답
예제 응답 섹션{ "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 } ]}삭제
삭제 섹션https://api.capgo.app/channel/
채널을 삭제합니다. 이 채널을 사용하는 모든 기기에 영향을 줄 수 있습니다.
쿼리 매개변수
쿼리 매개변수 섹션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"}오류 처리
오류 처리일반 오류 상황 및 응답:
// Channel not found{ "error": "Channel not found", "status": "KO"}
// Invalid bundle (version) format{ "error": "Invalid version format. Use semantic versioning", "status": "KO"}
// Invalid update policy{ "error": "Invalid disableAutoUpdate value", "status": "KO"}
// Permission denied{ "error": "Insufficient permissions to manage channels", "status": "KO"}일반 사용 사례
일반 사용 사례- 베타 테스트
{ "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}