Zum Inhalt springen

Kanäle

Kanäle sind der zentrale Mechanismus zur Verwaltung von App-Updates in Capgo. Sie ermöglichen es Ihnen zu kontrollieren, wie und wann Ihre Benutzer Updates erhalten, und ermöglichen Funktionen wie A/B-Tests, gestaffelte Rollouts und plattformspezifische Updates.

Ein Kanal stellt einen Verteilungsweg für Ihre App-Updates dar. Jeder Kanal kann mit spezifischen Regeln und Einschränkungen konfiguriert werden:

  • Versionskontrolle: Geben Sie an, welche Version Benutzer erhalten
  • Plattform-Targeting: Zielen Sie auf bestimmte Plattformen ab (iOS/Android)
  • Update-Richtlinien: Kontrollieren Sie, wie Updates bereitgestellt werden
  • Gerätebeschränkungen: Verwalten Sie, welche Geräte auf Updates zugreifen können
  • public: Als Standardkanal für neue Geräte festlegen
  • disableAutoUpdateUnderNative: Verhindert Updates, wenn die native App-Version des Geräts neuer ist als die im Kanal verfügbare Update-Version (z.B. Gerät ist auf Version 1.2.3, aber Kanal hat 1.2.2)
  • disableAutoUpdate: Update-Verhalten steuern (“major”, “minor”, “version_number”, “none”)
  • ios/android: Für bestimmte Plattformen aktivieren/deaktivieren
  • allow_device_self_set: Geräten erlauben, ihren Kanal selbst zu wählen
  • allow_emulator: Updates auf Emulator-Geräten zulassen
  • allow_dev: Updates auf Entwicklungs-Builds zulassen
  1. Test-Kanal: Pflegen Sie einen Test-Kanal für interne Validierung
  2. Gestaffelter Rollout: Verwenden Sie mehrere Kanäle für schrittweise Update-Bereitstellung
  3. Plattform-Trennung: Erstellen Sie bei Bedarf separate Kanäle für iOS und Android
  4. Versionskontrolle: Verwenden Sie semantische Versionierung für klare Update-Pfade

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

Erstellen oder aktualisieren Sie eine Kanal-Konfiguration.

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
}
Terminal-Fenster
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/

Abrufen von Kanal-Informationen. Gibt 50 Kanäle pro Seite zurück.

  • app_id: Erforderlich. Die ID Ihrer App
  • page: Optional. Seitennummer für Paginierung
  • channel: Optional. Spezifischer Kanalname zum Abrufen
Terminal-Fenster
# Alle Kanäle abrufen
curl -H "authorization: your-api-key" \
"https://api.capgo.app/channel/?app_id=app_123"
# Bestimmten Kanal abrufen
curl -H "authorization: your-api-key" \
"https://api.capgo.app/channel/?app_id=app_123&channel=beta"
# Nächste Seite abrufen
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
}
]
}

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

Löschen Sie einen Kanal. Beachten Sie, dass dies alle Geräte betrifft, die diesen Kanal verwenden.

interface Channel {
channel: string
app_id: string
}
Terminal-Fenster
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"
}

Häufige Fehlerszenarien und ihre Antworten:

// Kanal nicht gefunden
{
"error": "Channel not found",
"status": "KO"
}
// Ungültiges Versionsformat
{
"error": "Invalid version format. Use semantic versioning",
"status": "KO"
}
// Ungültige Update-Richtlinie
{
"error": "Invalid disableAutoUpdate value",
"status": "KO"
}
// Berechtigung verweigert
{
"error": "Insufficient permissions to manage channels",
"status": "KO"
}
  1. Beta-Tests
{
"app_id": "app_123",
"channel": "beta",
"version": "1.2.0-beta",
"public": false,
"allow_emulator": true,
"allow_dev": true
}
  1. Produktions-Rollout
{
"app_id": "app_123",
"channel": "production",
"version": "1.2.0",
"public": true,
"disableAutoUpdate": "minor"
}
  1. Plattformspezifische Updates
{
"app_id": "app_123",
"channel": "ios-hotfix",
"version": "1.2.1",
"ios": true,
"android": false
}