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.
Kanäle verstehen
Section titled “Kanäle verstehen”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
Kanal-Konfigurationsoptionen
Section titled “Kanal-Konfigurationsoptionen”- 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
Best Practices
Section titled “Best Practices”- Test-Kanal: Pflegen Sie einen Test-Kanal für interne Validierung
- Gestaffelter Rollout: Verwenden Sie mehrere Kanäle für schrittweise Update-Bereitstellung
- Plattform-Trennung: Erstellen Sie bei Bedarf separate Kanäle für iOS und Android
- Versionskontrolle: Verwenden Sie semantische Versionierung für klare Update-Pfade
Endpunkte
Section titled “Endpunkte”https://api.capgo.app/channel/
Erstellen oder aktualisieren Sie eine Kanal-Konfiguration.
Request Body
Section titled “Request Body”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}Beispielanfrage
Section titled “Beispielanfrage”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/Erfolgsantwort
Section titled “Erfolgsantwort”{ "status": "ok"}https://api.capgo.app/channel/
Abrufen von Kanal-Informationen. Gibt 50 Kanäle pro Seite zurück.
Query-Parameter
Section titled “Query-Parameter”app_id: Erforderlich. Die ID Ihrer Apppage: Optional. Seitennummer für Paginierungchannel: Optional. Spezifischer Kanalname zum Abrufen
Beispielanfragen
Section titled “Beispielanfragen”# Alle Kanäle abrufencurl -H "authorization: your-api-key" \ "https://api.capgo.app/channel/?app_id=app_123"
# Bestimmten Kanal abrufencurl -H "authorization: your-api-key" \ "https://api.capgo.app/channel/?app_id=app_123&channel=beta"
# Nächste Seite abrufencurl -H "authorization: your-api-key" \ "https://api.capgo.app/channel/?app_id=app_123&page=1"Antworttyp
Section titled “Antworttyp”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;}Beispielantwort
Section titled “Beispielantwort”{ "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 } ]}DELETE
Section titled “DELETE”https://api.capgo.app/channel/
Löschen Sie einen Kanal. Beachten Sie, dass dies alle Geräte betrifft, die diesen Kanal verwenden.
Query-Parameter
Section titled “Query-Parameter”interface Channel { channel: string app_id: string}Beispielanfrage
Section titled “Beispielanfrage”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/Erfolgsantwort
Section titled “Erfolgsantwort”{ "status": "ok"}Fehlerbehandlung
Section titled “Fehlerbehandlung”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"}Häufige Anwendungsfälle
Section titled “Häufige Anwendungsfälle”- Beta-Tests
{ "app_id": "app_123", "channel": "beta", "version": "1.2.0-beta", "public": false, "allow_emulator": true, "allow_dev": true}- Produktions-Rollout
{ "app_id": "app_123", "channel": "production", "version": "1.2.0", "public": true, "disableAutoUpdate": "minor"}- Plattformspezifische Updates
{ "app_id": "app_123", "channel": "ios-hotfix", "version": "1.2.1", "ios": true, "android": false}