Zum Inhalt springen

Apps

Apps are the foundational entities in Capgo. Each app represents a unique Capacitor application that you can manage and update through the platform. The Apps API allows you to create, retrieve, update, and delete app configurations.

An app in Capgo represents your Capacitor application and includes:

  • App-ID: Eindeutige Identifikationsnummer für Ihre Anwendung
  • Name: Lesbarer Name Ihrer Anwendung
  • Icons: Visuelle Identifikatoren für Ihre App im Dashboard
  • Konfiguration: Einstellungen, die die Übermittlung von Updates steuern
  • Besitz: Informationen zur Organisation und Benutzerzugriff
  • Verwendungsstatistiken: Metriken zu Installationen und Updates
  1. Namenkonvention: Verwenden Sie klare, identifizierbare Namen für Ihre Apps
  2. Sicherheit: Schützen Sie Ihre API-Schlüssel und Zugriffsanmeldeinformationen
  3. Organisation: Gruppieren Sie verwandte Apps unter derselben Organisation
  4. Überwachung: Überprüfen Sie regelmäßig die App-Statistiken und -Leistung
  5. Backup: Halten Sie Konfigurations-Backups für kritische Apps aufrecht

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

Informationen über Ihre Apps abrufen.

  • page: Optional. Seitennummer für die Paginierung
  • limit: Optional. Anzahl der Ergebnisse pro Seite (Standard: 50)
  • org_id: Optional. Apps filtern nach Organisation ID. Wenn nicht angegeben, werden Apps von allen Organisationen zurückgegeben, zu denen der Benutzer Zugriff hat

Ein bestimmte App abrufen:

  • Verwenden Sie die App-ID im URL-Pfad: https://api.capgo.app/app/:app_id

Hinweis: last_version __CAPGO_KEEP_0__ bezieht sich auf die letzte Bundle (Version), die für die App hochgeladen wurde.

interface App {
app_id: string
created_at: string | null
default_upload_channel: string
icon_url: string
id: string | null
last_version: string | null // last bundle (version) name
name: string | null
owner_org: string
retention: number
transfer_history: Json[] | null
updated_at: string | null
user_id: string | null
}
Terminalfenster
# Get all apps
curl -H "authorization: your-api-key" \
"https://api.capgo.app/app/"
# Get apps from a specific organization
curl -H "authorization: your-api-key" \
"https://api.capgo.app/app/?org_id=046a36ac-e03c-4590-9257-bd6c9dba9ee8"
# Get specific app
curl -H "authorization: your-api-key" \
"https://api.capgo.app/app/com.demo.app"
{
"data": [
{
"app_id": "com.demo.app",
"created_at": "2024-01-01T00:00:00Z",
"default_upload_channel": "dev",
"icon_url": "https://example.com/icon.png",
"id": "550e8400-e29b-41d4-a716-446655440000",
"last_version": "1.0.0",
"name": "Demo App",
"owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8",
"retention": 2592000,
"transfer_history": null,
"updated_at": "2024-01-01T00:00:00Z",
"user_id": "6aa76066-55ef-4238-ade6-0b32334a4097"
}
]
}

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

Eine neue App erstellen.

interface CreateApp {
app_id: string
name: string
icon?: string
owner_org: string
}
Terminalfenster
# Create new app
curl -X POST \
-H "authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "My New App",
"app_id": "com.demo.myapp", // this id is unique in Capgo This cannot be reused by any account.
"icon": "https://example.com/icon.png",
"owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8"
}' \
https://api.capgo.app/app/
{
"app_id": "My New App",
"created_at": "2024-01-01T00:00:00Z",
"default_upload_channel": "dev",
"icon_url": "https://example.com/icon.png",
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "My New App",
"owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8",
"retention": 2592000,
"updated_at": "2024-01-01T00:00:00Z"
}

https://api.capgo.app/app/:app_id

Eine bestehende App aktualisieren. Die App-ID wird im URL-Pfad angegeben.

interface UpdateApp {
name?: string
icon?: string
retention?: number
}
Terminalfenster
curl -X PUT \
-H "authorization: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated App Name",
"icon": "https://example.com/updated-icon.png",
"retention": 45
}' \
https://api.capgo.app/app/com.demo.app
{
"app_id": "com.demo.app",
"created_at": "2024-01-01T00:00:00Z",
"default_upload_channel": "dev",
"icon_url": "https://example.com/updated-icon.png",
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Updated App Name",
"owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8",
"retention": 45,
"updated_at": "2024-01-01T00:00:00Z"
}

https://api.capgo.app/app/:app_id

Eine App und alle damit verbundenen Ressourcen löschen. Die App-ID wird im URL-Pfad angegeben. Verwenden Sie mit größter Vorsicht, da diese Aktion nicht rückgängig gemacht werden kann.

Terminalfenster
curl -X DELETE \
-H "authorization: your-api-key" \
https://api.capgo.app/app/com.demo.app
{
"status": "ok"
}

Häufige Fehler-Szenarien und ihre Antworten:

// App not found
{
"error": "App not found",
"status": "KO"
}
// Duplicate custom ID
{
"error": "Custom ID already in use",
"status": "KO"
}
// Invalid parameters
{
"error": "Invalid app configuration",
"status": "KO"
}
// Permission denied
{
"error": "Insufficient permissions to manage app",
"status": "KO"
}
// Organization access denied
{
"status": "You do not have access to this organization"
}
  1. Neue App erstellen
// Set up a new app
{
"name": "Production App",
"owner_org": "046a36ac-e03c-4590-9257-bd6c9dba9ee8"
}
  1. App-Konfiguration aktualisieren
// Change app name and icon
{
"name": "Rebranded App Name",
"icon": "https://example.com/new-icon.png"
}
  1. Rückhalteregelung festlegen
// Configure automatic bundle cleanup
{
"retention": 30 // Keep bundles for 30 days
}
  1. Apps durch Organisation abrufen
Terminalfenster
# List all apps in a specific organization
curl -H "authorization: your-api-key" \
"https://api.capgo.app/app/?org_id=046a36ac-e03c-4590-9257-bd6c9dba9ee8"
  1. SpeicheroptimierungSpeicherplatz überwachen und angemessene Aufbewahrungsfristen festlegen
  2. OrganisationGruppieren Sie verwandte Apps unter einer einzelnen Organisation
  3. ZugriffssteuerungVerwalten Sie, welche Teammitglieder App-Einstellungen ändern dürfen
  4. Hochlaufstrategie: Richte kritische App-Konfigurationen und -Einstellungen sicher ab

Wenn Sie Apps verwenden Apps um das Dashboard und die API-Operationen zu planen, verbinden Sie es mit API-Übersicht zur Implementierungsdetail in API-Übersicht, Einführung zur Implementierungsdetail in Einführung, API-Schlüssel zur Implementierungsdetail in API-Schlüssel, Geräte für die Implementierungsdetails in Geräte, und Pakete für die Implementierungsdetails in Pakete.