메뉴로 이동

채널

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

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

  • 배포 버전 제어: 사용자가 받는 배포 버전을 지정합니다
  • 플랫폼 대상: iOS/Android/Electron과 같은 특정 플랫폼을 대상으로합니다
  • 업데이트 정책: 업데이트 전달 방법을 제어합니다.
  • 기기 제한: 업데이트에 접근할 수 있는 기기를 관리합니다.
  • 공개: 새로운 기기에 기본 채널로 설정합니다.
  • disableAutoUpdateUnderNative: 기기의 네이티브 앱 버전이 채널의 안정적인 패키지보다 최신일 때 업데이트를 방지합니다.
  • 자동 업데이트 차단: 업데이트 동작을 제어합니다.major, minor, metadata, patch, or none).
  • ios/android/electron:
  • allow_device_self_set:
  • allow_emulator, allow_device, allow_dev, : Progressive rollout
  • : See 진보적인 롤아웃.
  1. 테스트 채널: 내부 검증을 위한 테스트 채널을 유지하세요
  2. 스테이지드 롤아웃: 여러 채널을 사용하여 점진적인 업데이트의 배포
  3. 플랫폼 분리: 필요할 때 iOS, Android, Electron에 대한 별도의 채널을 생성하세요
  4. 번들(버전) 관리: 세미나 버전 관리 업데이트 경로를 명확하게 설정하기 위해

엔드포인트

엔드포인트

POST

POST

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

채널 구성 설정을 만들거나 업데이트하기

요청 본문

요청 본문
type DisableAutoUpdate = "major" | "minor" | "metadata" | "patch" | "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
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. camelCase 형식이 제공된 경우 camelCase 값이 우선합니다. rollback camelCase 형식만 제공됩니다.

롤아웃 대상은 기존 채널이 필요합니다. 기존에 안정적인 번들을 할당하거나 POST 요청을 통해 할당받아야 합니다. 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는 업데이트를 포함하고 상태만 반환합니다. 결과 채널 구성 읽기 위해 GET 요청을 만듭니다.

앱 미리보기 키 경계

앱 미리보기 키 경계 섹션

최소 권한의 PR 미리보기에 대해 이 엔드포인트를 인증하세요. authorization: $CAPGO_API_KEY 또는 capgkey: $CAPGO_API_KEY헤더는 채널의 __CAPGO_KEEP_0__에서 수락되지 않습니다. x-api-key header is not accepted by the Channels API.

For a least-privilege PR preview, authenticate this endpoint with app_preview The channel.update_settings이러한 채널은 POST를 사용하여 업데이트할 수 없으며, 기존의 기본 또는 메인 채널을 포함합니다.

Leave public unset (또는 false를 PR 미리보기 채널에 설정합니다.) bundle upload --channel for PR 미리보기 채널에 사용하고, POST를 일반 미리보기 채널 업데이트로 대신 사용합니다.

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

채널 정보를 조회합니다. 50개의 채널을 반환합니다. channel를 생략하면 배열이 반환됩니다. channel를 포함하면 하나의 채널 객체가 반환됩니다.

  • app_id: __CAPGO_KEEP_0__이 필요합니다. 앱의 ID를 입력하세요.
  • page: __CAPGO_KEEP_0__. 페이징을 위한 페이지 번호입니다.
  • channel: __CAPGO_KEEP_0__. 특정 채널 이름을 입력하세요.
터미널 창
# 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
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 입력 전용 단축키로, 중단된 배포를 나타냅니다. 중단된 배포는 null이 아닌 값을 가집니다. rolloutPausedAt.

[
{
"id": 1,
"name": "production",
"app_id": "com.example.app",
"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/

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

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 키는 만든 채널과 연결된, 공유되지 않은 패키지만 atomically 정리할 수 있습니다. 키는 일반 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/

오류 처리

에러 처리

일반적인 오류 상황과 그에 대한 응답:

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

__CAPGO_KEEP_0__을 사용 중이라면 Channels Channels와 연결하여 Channels Channels에서 구현 세부 정보를 확인하세요. Channels Channels에서 구현 세부 정보를 확인하세요. Beta Testing Solution Beta Testing Solution에서 제품 워크플로우를 사용하세요. Version Targeting Solution Version Targeting Solution에서 제품 워크플로우를 사용하세요. Capgo 환경 최적화 방법: 단일 모바일 앱 ID를 사용한 스테이징 Capgo 환경 최적화 방법: 단일 모바일 앱 ID를 사용한 스테이징을 위해.