내용으로 건너뛰기

채널

채널은 Capgo 앱 업데이트를 관리하는 핵심 메커니즘입니다. 채널은 사용자가 업데이트를 받는 방법과 언제 받는지를 제어할 수 있게 해주며, A/B 테스트, 단계별 롤아웃 및 플랫폼별 업데이트와 같은 기능을 활성화할 수 있습니다.

채널 이해

채널 이해란

채널은 앱 업데이트의 배포 트랙을 나타냅니다. 각 채널은 특정 규칙과 제약을 구성할 수 있습니다:

  • 배포 버전 제어: 사용자가 받는 배포 버전을 지정합니다
  • 플랫폼 목표 설정: iOS/Android/Electron 플랫폼을 대상으로 설정합니다.
  • 업데이트 정책: 업데이트 전달 방법을 제어합니다.
  • 장치 제한: 업데이트에 접근할 수 있는 장치를 관리합니다.

채널 구성 옵션

채널 구성 옵션
  • 공개: 새로운 장치에 대한 기본 채널로 설정합니다.
  • 네이티브 앱 버전보다 업데이트 패키지 버전이 낮을 때 업데이트를 차단: 장치의 네이티브 앱 버전이 업데이트 패키지 버전보다 높을 때 업데이트를 차단합니다. (예: 장치의 네이티브 앱 버전이 1.2.3이고 채널에 업데이트 패키지 버전 1.2.2가 있는 경우)
  • disableAutoUpdate: 업데이트를 제어하는 방법 (“major”, “minor”, “version_number”, “none”)
  • ios/android/electron: 특정 플랫폼에 대해 활성화/비활성화
  • allow_device_self_set: 장치가 채널을 선택할 수 있도록 함
  • allow_emulator: 에뮬레이터 장치에서 업데이트를 허용
  • allow_dev: 개발 빌드에서 업데이트를 허용

Best Practices

: Best Practices
  1. 테스트 채널: 내부 검증을 위한 테스트 채널을 유지합니다.
  2. 스테이지드 롤아웃: 여러 채널을 사용하여 점진적인 업데이트 배포
  3. 플랫폼 분리: 필요할 때 iOS, Android, Electron에 대한 별도의 채널을 생성합니다.
  4. 버전드 배포 제어: 명확한 업데이트 경로를 위해 세미나틱 버전 를 사용합니다.

엔드포인트

엔드포인트

POST

POST

https://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"
}

https://api.capgo.app/channel/

채널 정보를 가져옵니다. 50개 채널씩 페이지당 반환합니다.

쿼리 매개변수

쿼리 매개변수 섹션
  • app_id: 필수. 앱 ID
  • page: 선택적. 페이징을 위한 페이지 번호
  • channel: 선택적. 특정 채널 이름을 가져옵니다.
터미널 창
# Get all channels
curl -H "authorization: your-api-key" \
"https://api.capgo.app/channel/?app_id=app_123"
# Get specific channel
curl -H "authorization: your-api-key" \
"https://api.capgo.app/channel/?app_id=app_123&channel=beta"
# Get next page
curl -H "authorization: your-api-key" \
"https://api.capgo.app/channel/?app_id=app_123&page=1"

__CAPGO_KEEP_1__

__CAPGO_KEEP_2__
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;
}

__CAPGO_KEEP_3__ version __CAPGO_KEEP_4__

__CAPGO_KEEP_2__

__CAPGO_KEEP_0__
{
"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
}
]
}

__CAPGO_KEEP_6__

__CAPGO_KEEP_2__

https://api.capgo.app/channel/

__CAPGO_KEEP_7__

__CAPGO_KEEP_0__

__CAPGO_KEEP_1__
interface Channel {
channel: string
app_id: string
}

__CAPGO_KEEP_3__

__CAPGO_KEEP_4__
__CAPGO_KEEP_5__
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/

__CAPGO_KEEP_7__

__CAPGO_KEEP_8__
{
"status": "ok"
}

__CAPGO_KEEP_10__

__CAPGO_KEEP_11__

일반 오류 시나리오 및 그에 대한 응답:

// 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"
}
  1. 베타 테스트
{
"app_id": "app_123",
"channel": "beta",
"version": "1.2.0-beta",
"public": false,
"allow_emulator": true,
"allow_dev": true
}
  1. 운영 배포
{
"app_id": "app_123",
"channel": "production",
"version": "1.2.0",
"public": true,
"disableAutoUpdate": "minor"
}
  1. 플랫폼별 업데이트
{
"app_id": "app_123",
"channel": "ios-hotfix",
"version": "1.2.1",
"ios": true,
"android": false
}

__CAPGO_KEEP_0__ 환경 최적화: 단일 모바일 앱 ID를 사용한 스테이징 채널 채널과 채널 라우팅 및 스테이지 롤아웃을 계획하기 위해 연결하세요. 채널 채널에서 채널 구현 세부 정보를 확인하세요. 채널 채널에서 채널 구현 세부 정보를 확인하세요. 베타 테스트 솔루션 베타 테스트 솔루션에서 제품 워크플로우를 확인하세요. 버전 대상 솔루션 버전 대상 솔루션에서 제품 워크플로우를 확인하세요. Capgo Environment Best Practices: Staging with One Mobile App ID Capgo 환경에서 실용적인 맥락을 위한 Capgo 환경 설정 지침: 단일 모바일 앱 ID를 사용한 스테이징.