Zum Inhalt springen

Statistiken

Die Statistik-Endpoints bieten detaillierte Analysen über Ihre Apps und Organisationen. Sie können monatlich aktive Benutzer (MAU), Speichernutzung und Bandbreitenverbrauch über verschiedene Zeiträume verfolgen. Diese Daten sind wichtig zum Überwachen des App-Wachstums, der Ressourcennutzung und der Kapazitätsplanung.

  • MAU (Monatlich aktive Benutzer): Anzahl der eindeutigen Geräte, die Ihre App in den letzten 30 Tagen verwendet haben
  • Speicher: Gesamtgröße aller in Bytes gespeicherten Bundles und Ressourcen
  • Bandbreite: Gesamte Datenübertragung für Bundle-Downloads in Bytes
  1. Regelmäßige Überwachung: Überprüfen Sie regelmäßig Statistiken, um Wachstum und Nutzungsmuster zu verfolgen
  2. Ressourcenplanung: Verwenden Sie Speicher- und Bandbreitemetriken für die Kapazitätsplanung
  3. Benutzerengagement: Verfolgen Sie MAU, um Benutzerengagement-Trends zu verstehen
  4. Kostenmanagement: Überwachen Sie die Ressourcennutzung, um Kosten zu optimieren

Rufen Sie Statistiken für eine bestimmte App ab. Dieser Endpoint ist nützlich zum Überwachen der Leistung einzelner Apps.

interface StatsQuery {
from: Date // Start date for the statistics (format: YYYY-MM-DD)
to: Date // End date for the statistics (format: YYYY-MM-DD)
}
Terminal-Fenster
curl -H "authorization: your-api-key" \
"https://api.capgo.app/statistics/app/com.demo.app/?from=2024-01-01&to=2024-02-01"
[
{
"date": "2024-01-01",
"mau": 1500,
"storage": 536870912, // 512MB in bytes
"bandwidth": 1073741824 // 1GB in bytes
},
{
"date": "2024-01-02",
"mau": 1550,
"storage": 537919488, // 513MB in bytes
"bandwidth": 1074790400 // 1.01GB in bytes
}
]

Get statistics for a specific organization. Useful for monitoring organization-level usage.

interface StatsQuery {
from: Date // Start date for the statistics (format: YYYY-MM-DD)
to: Date // End date for the statistics (format: YYYY-MM-DD)
breakdown: boolean // default false, optional if true it return the breakdown by app
noAccumulate: boolean // default false, optional if true it will not accumulate data and just return day by day result
}
Terminal-Fenster
curl -H "authorization: your-api-key" \
"https://api.capgo.app/statistics/org/046a36ac-e03c-4590-9257-bd6c9dba9ee8/?from=2024-01-01&to=2024-02-01"
[
{
"date": "2024-01-01",
"mau": 10000,
"storage": 536870912, // 512MB in bytes
"bandwidth": 1073741824 // 1GB in bytes
},
{
"date": "2024-01-02",
"mau": 10200,
"storage": 537919488, // 513MB in bytes
"bandwidth": 1074790400 // 1.01GB in bytes
}
]

Get aggregated statistics across all organizations you have access to. Perfect for overall usage monitoring.

interface StatsQuery {
from: Date // Start date for the statistics (format: YYYY-MM-DD)
to: Date // End date for the statistics (format: YYYY-MM-DD)
}
Terminal-Fenster
curl -H "authorization: your-api-key" \
"https://api.capgo.app/statistics/user/?from=2024-01-01&to=2024-02-01"
[
{
"date": "2024-01-01",
"mau": 25000,
"storage": 1073741824, // 1GB in bytes
"bandwidth": 2147483648 // 2GB in bytes
},
{
"date": "2024-01-02",
"mau": 25500,
"storage": 1074790400, // 1.01GB in bytes
"bandwidth": 2148532224 // 2.01GB in bytes
}
]

Get bundle usage statistics for a specific app, showing the distribution of versions among users over a specified period.

interface BundleUsageQuery {
from: Date // Start date for the statistics (format: YYYY-MM-DD)
to: Date // End date for the statistics (format: YYYY-MM-DD)
}
Terminal-Fenster
curl -H "authorization: your-api-key" \
"https://api.capgo.app/statistics/app/com.demo.app/bundle_usage?from=2024-01-01&to=2024-02-01"
{
"labels": ["2024-01-01", "2024-01-02", "2024-01-03"],
"datasets": [
{
"label": "1.0.0",
"data": [60.5, 58.2, 55.3]
},
{
"label": "1.0.1",
"data": [39.5, 41.8, 44.7]
}
]
}

Common error scenarios and their responses:

// Invalid body
{
"status": "Invalid body",
"error": "Invalid date format or missing parameters"
}
// Permission denied
{
"status": "You can't access this app",
"error": "Insufficient permissions to access statistics"
}
// Permission denied for organization
{
"status": "You can't access this organization",
"error": "Insufficient permissions to access organization statistics"
}
// No organizations found for user statistics
{
"status": "No organizations found",
"error": "No organizations found"
}
// Internal server error
{
"status": "Cannot get app statistics",
"error": "Internal server error message"
}
  1. Growth Tracking: Monitor MAU growth over time
  2. Resource Optimization: Track storage and bandwidth usage to optimize costs
  3. Capacity Planning: Use trends to plan for future resource needs
  4. Usage Reports: Generate periodic usage reports for stakeholders
  5. Version Distribution Analysis: Understand how users are distributed across different app versions with bundle usage statistics
  1. Compare Periods: Look at month-over-month or year-over-year trends
  2. Track Ratios: Monitor bandwidth per user or storage per app
  3. Set Alerts: Create alerts for unusual spikes in usage
  4. Regular Backups: Export statistics regularly for historical analysis
  5. Version Adoption: Use bundle usage to track adoption rates of new versions