본문 바로가기

채널

채널은 Capgo에서 앱 업데이트를 관리하는 핵심 메커니즘입니다. 사용자가 업데이트를 받는 방식과 시점을 제어할 수 있어 A/B 테스트, 단계적 배포, 플랫폼별 업데이트와 같은 기능을 사용할 수 있습니다.

채널은 앱 업데이트의 배포 트랙을 나타냅니다. 각 채널에는 다음 규칙과 제약 조건을 설정할 수 있습니다:

  • Bundle(버전) 관리: 사용자가 받을 번들(버전) 지정
  • 플랫폼 타겟팅: 특정 플랫폼(iOS/Android/Electron) 타겟팅
  • 업데이트 정책: 업데이트 전달 방식 제어
  • 기기 제한: 업데이트에 접근할 수 있는 디바이스를 관리합니다.
  • 공개: 새 디바이스의 기본 채널로 설정합니다.
  • disableAutoUpdateUnderNative: 디바이스의 네이티브 앱 버전이 채널의 stable bundle보다 최신이면 업데이트를 방지합니다.
  • disableAutoUpdate: 업데이트 동작을 제어합니다 (major, minor, patch, version_number, 또는 none). metadata 의 alias로 허용됨 version_number.
  • updatePackage: 디바이스가 zip, delta 또는 둘 다를 다운로드할지 제어합니다 (all, zip, delta, zip_from_builtin, 또는 delta_from_builtin"). 규칙은 다운로드 형식.
  • ios/android/electron: 플랫폼별 배포를 활성화하거나 비활성화합니다.
  • allow_device_self_set: 디바이스가 채널을 선택하도록 허용합니다.
  • 에뮬레이터 허용, allow_device, allow_dev, allow_prod: 업데이트를 받을 디바이스 및 빌드 타입을 제어합니다.
  • 점진적 롤아웃: 안정적인 번들을 유지하면서 스티키 코호트에 타겟 번들을 노출합니다. 참고 단계적 배포.
  1. 테스트 채널: 내부 검증을 위한 테스트 채널을 운영합니다.
  2. 단계적 배포: 여러 채널을 사용하여 업데이트를 점진적으로 배포합니다.
  3. 플랫폼 분리: 필요에 따라 iOS, Android, Electron용 채널을 각각 생성합니다.
  4. Bundle(버전) 관리: 시맨틱 버저닝 명확한 업데이트 경로를 위해

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

채널 설정을 생성하거나 업데이트합니다.

요청 본문

Request Body 섹션
type DisableAutoUpdate = "major" | "minor" | "patch" | "version_number" | "metadata" | "none"
type AutoPauseAction = "pause" | "rollback" | "notify"
interface ChannelSet {
app_id: string
channel: string
version?: string | null // stable bundle name
public?: boolean
disableAutoUpdateUnderNative?: boolean
disableAutoUpdate?: DisableAutoUpdate
updatePackage?: "all" | "zip" | "delta" | "zip_from_builtin" | "delta_from_builtin"
ios?: boolean
android?: boolean
electron?: boolean
allow_device_self_set?: boolean
allow_emulator?: boolean
allow_device?: boolean
allow_dev?: boolean
allow_prod?: boolean
// Progressive rollout (camelCase is preferred)
rolloutVersion?: string | number | null // target bundle name or ID
rolloutPercentage?: number // 0–100
rolloutPercentageBps?: number // 0–10000; takes precedence when both are set
rolloutEnabled?: boolean
rolloutPaused?: boolean // input-only convenience flag
rolloutPausedAt?: string | null // ISO timestamp or null
rolloutPauseReason?: string | null
rolloutCacheTtlSeconds?: number // 60–31536000
rollback?: boolean
promoteToStable?: boolean
// Rollout auto-pause policy
autoPauseEnabled?: boolean
autoPauseWindowMinutes?: number
autoPauseFailureRateBps?: number | null
autoPauseConfidence?: number
autoPauseMinAttempts?: number | null
autoPauseMinFailures?: number | null
autoPauseAction?: AutoPauseAction
autoPauseCooldownMinutes?: number
}

롤아웃 및 자동 일시정지 필드의 경우, API 도 동등한 snake_case 형식을 지원하며, 예를 들어 rollout_version 또는 auto_pause_enabled. updatePackage 도 지원합니다 update_package. 두 형식이 모두 제공되면 camelCase 값이 우선합니다. rollback 은 camelCase만 지원합니다.

롤아웃 대상에는 기존 채널이 필요합니다. 이미 안정적인 번들이 할당되어 있거나, 다음을 통해 번드를 받아야 합니다: version 같은 POST 요청에서. rollback 및 promoteToStable 은 종단 동작입니다. 서로 조합하지 마세요.

기존 채널에 5% 롤아웃 구성 production 안정적 번들이 이미 설정된 채널:

터미널 창
curl -X POST \
-H "authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"app_id": "com.example.app",
"channel": "production",
"rolloutVersion": "1.3.0",
"rolloutPercentage": 5,
"rolloutEnabled": true,
"rolloutCacheTtlSeconds": 2592000,
"autoPauseEnabled": true,
"autoPauseFailureRateBps": 500,
"autoPauseMinAttempts": 100,
"autoPauseAction": "pause"
}' \
https://api.capgo.app/channel/
{
"status": "ok"
}

POST는 업서트(upsert)이며 상태만 반환합니다. 결과 채널 구성을 읽으려면 GET 요청을 보내세요.

앱 미리보기 키 경계

“앱 미리보기 키 경계” 섹션

최소 권한 PR 미리보기를 위해 이 엔드포인트 인증에 다음을 사용하세요: authorization: $CAPGO_API_KEY 또는 capgkey: $CAPGO_API_KEY. x-api-key 헤더는 Channels API에서 허용되지 않습니다.

한 app_preview 키는 새 비공개 프리뷰 채널을 생성할 수 있습니다. 생성 시 해당 키에는 해당 채널에만 적용되는 채널 범위 lifecycle binding이 자동으로 부여됩니다. 이 역할에는 channel.update_settings 권한이 포함되지 않으므로, 기존 default 또는 main 채널을 포함한 기존 채널을 POST로 업데이트할 수 없습니다.

다음 값은 public unset 상태로 두거나 값을 지정하세요 false. PR 프리뷰 채널의 경우 bundle upload --channel POST를 일반적인 preview-channel upsert로 처리하는 대신, 생성 및 upload 흐름에 사용합니다.

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

채널 정보를 가져옵니다. 페이지당 50개 채널을 반환합니다. 없이 channel, 응답은 배열입니다. channel, 응답은 채널 객체 하나입니다.

  • app_id: 필수. 앱의 ID
  • page: 선택 사항. 페이지네이션용 페이지 번호
  • channel: 선택 사항. 가져올 특정 채널 이름
터미널 창
# Get all channels
curl -H "authorization: your-api-key" \
"https://api.capgo.app/channel/?app_id=com.example.app"
# Get a specific channel
curl -H "authorization: your-api-key" \
"https://api.capgo.app/channel/?app_id=com.example.app&channel=production"
# Get the next page
curl -H "authorization: your-api-key" \
"https://api.capgo.app/channel/?app_id=com.example.app&page=1"
interface Channel {
id: number
created_at: string
updated_at: string
name: string
app_id: string
created_by: string
public: boolean
disableAutoUpdateUnderNative: boolean
disableAutoUpdate: DisableAutoUpdate
updatePackage: "all" | "zip" | "delta" | "zip_from_builtin" | "delta_from_builtin"
allow_device_self_set: boolean
allow_emulator: boolean
allow_device: boolean
allow_dev: boolean
allow_prod: boolean
version: { id: number, name: string } | null // stable bundle
// These three response identifiers intentionally use snake_case.
rollout_version: number | null
rollout_id: string
rollout_version_info: { id: number, name: string } | null
rolloutPercentageBps: number
rolloutEnabled: boolean
rolloutPausedAt: string | null
rolloutPauseReason: string | null
rolloutCacheTtlSeconds: number
autoPauseEnabled: boolean
autoPauseWindowMinutes: number
autoPauseFailureRateBps: number | null
autoPauseConfidence: number
autoPauseMinAttempts: number | null
autoPauseMinFailures: number | null
autoPauseAction: AutoPauseAction
autoPauseCooldownMinutes: number
autoPauseLastTriggeredAt: string | null
autoPauseLastCheckedAt: string | null
}

rolloutPaused 입력 전용 shortcut이며 반환되지 않습니다. 일시 중지된 롤아웃은 null이 아닌 값으로 표시됩니다. rolloutPausedAt.

[
{
"id": 1,
"name": "production",
"app_id": "com.example.app",
"updatePackage": "all",
"version": { "id": 1, "name": "1.2.0" },
"rollout_version": 2,
"rollout_id": "e60c19c9-2e65-4e0d-bc06-d1f5b4f96276",
"rollout_version_info": { "id": 2, "name": "1.3.0" },
"rolloutPercentageBps": 500,
"rolloutEnabled": true,
"rolloutPausedAt": null,
"rolloutCacheTtlSeconds": 2592000,
"autoPauseEnabled": true,
"autoPauseFailureRateBps": 500,
"autoPauseAction": "pause"
}
]

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

채널을 삭제합니다. 이 채널을 사용하는 모든 기기에 영향을 미칩니다.

요청 본문

Request Body 섹션
interface Channel {
channel: string
app_id: string
delete_bundle?: boolean // also delete the linked bundle
}
터미널 창
curl -X DELETE \
-H "authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"app_id": "com.example.app",
"channel": "beta"
}' \
https://api.capgo.app/channel/
{
"status": "ok"
}

사용하면 delete_bundle: true, app_preview 키는 자신이 생성한 채널과 그에 연결된, 공유되지 않은 bundle만 원자적으로 정리할 수 있습니다. 이 키는 일반적인 bundle.delete 권한.

터미널 창
curl -X DELETE \
-H "capgkey: $CAPGO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"app_id": "com.example.app",
"channel": "pr-123",
"delete_bundle": true
}' \
https://api.capgo.app/channel/

모든 에러는 다음에 설명된 표준 에러 형식을 사용합니다 API 개요.

일반적인 에러 시나리오와 응답:

// The API key has no access to the app
{
"error": "cannot_access_app",
"message": "You can't access this app",
"moreInfo": { "app_id": "com.example.app" }
}
// Invalid disableAutoUpdate value
{
"error": "invalid_disable_auto_update",
"message": "Disable auto update must be major, minor, patch, version_number, metadata, or none",
"moreInfo": { "disableAutoUpdate": "always" }
}
// Rollout percentage out of range
{
"error": "invalid_rollout_percentage",
"message": "Rollout percentage must be between 0 and 100",
"moreInfo": { "rolloutPercentage": 150 }
}
// DELETE without a channel name
{
"error": "missing_channel_name",
"message": "You must provide a channel name",
"moreInfo": {}
}
  1. 베타 테스트
{
"app_id": "com.example.app",
"channel": "beta",
"version": "1.2.0-beta",
"public": false,
"allow_emulator": true,
"allow_dev": true
}
  1. 프로덕션 롤아웃
{
"app_id": "com.example.app",
"channel": "production",
"version": "1.2.0",
"public": true,
"disableAutoUpdate": "minor"
}
  1. 플랫폼별 업데이트
{
"app_id": "com.example.app",
"channel": "ios-hotfix",
"version": "1.2.1",
"ios": true,
"android": false
}

Channels에서 계속하기

“Channels에서 계속하기” 섹션

사용 중이라면 채널 채널 라우팅과 단계적 배포를 계획하려면, 다음을 연결하세요: 채널 Channels의 구현 세부 사항은 다음을 참고하세요: 채널 Channels의 구현 세부 사항은 다음을 참고하세요: Beta Testing 솔루션 Beta Testing Solution의 제품 워크플로우에서 버전 타겟팅 솔루션 Version Targeting Solution의 제품 워크플로우에서, 그리고 Capgo 환경 베스트 프랙티스: 하나의 Mobile App ID로 스테이징하기 Capgo 환경 모범 사례: 모바일 앱 ID 하나로 스테이징의 실무 맥락에서