본문 바로가기

통계

Statistics API 엔드포인트를 통해 앱과 조직에 대한 상세한 분석 데이터를 확인할 수 있습니다. 월간 활성 사용자 수(MAU), 스토리지 사용량, 대역폭 사용량을 여러 기간에 걸쳐 추적할 수 있습니다. 이 데이터는 앱 성장과 리소스 사용량을 모니터링하고 용량을 계획하는 데 필수적입니다.

  • MAU(월간 활성 사용자): 지난 30일 동안 앱에 접속한 고유 디바이스 수
  • 스토리지: 저장된 모든 bundle과 리소스의 총 크기(byte 단위)
  • 대역폭: bundle 다운로드에 사용된 총 데이터 전송량(byte 단위)
  1. 정기 모니터링: 통계 데이터를 주기적으로 확인하여 성장세와 사용 패턴을 파악하세요
  2. 리소스 계획: 스토리지 및 대역폭 지표를 활용해 용량 계획을 세우세요
  3. 사용자 참여도: MAU를 추적하여 사용자 참여 트렌드를 이해하세요
  4. 비용 관리: 리소스 사용량을 모니터링하여 비용을 최적화하세요

GET /statistics/app/:app_id/

“GET /statistics/app/:app_id/” 섹션

특정 앱의 통계를 가져옵니다. 이 엔드포인트는 개별 앱의 성능을 모니터링하는 데 유용합니다.

interface StatsQuery {
from: Date // Start date for the statistics (format: YYYY-MM-DD)
to: Date // End date for the statistics (format: YYYY-MM-DD)
}
터미널 창
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/org/:org_id/

“GET /statistics/org/:org_id/” 섹션

특정 조직의 통계 데이터를 가져옵니다. 조직 단위의 사용량을 모니터링할 때 유용합니다.

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
}
터미널 창
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
}
]

접근 권한이 있는 모든 조직에 대한 집계된 통계를 가져옵니다. 전체 사용량 모니터링에 적합합니다.

interface StatsQuery {
from: Date // Start date for the statistics (format: YYYY-MM-DD)
to: Date // End date for the statistics (format: YYYY-MM-DD)
}
터미널 창
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 /statistics/app/:app_id/bundle_usage

“GET /statistics/app/:app_id/bundle_usage” 섹션

특정 앱의 bundle 사용량 통계를 가져옵니다. 지정된 기간 동안 사용자 간 bundle(버전) 분포를 보여줍니다.

interface BundleUsageQuery {
from: Date // Start date for the statistics (format: YYYY-MM-DD)
to: Date // End date for the statistics (format: YYYY-MM-DD)
}
터미널 창
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]
}
]
}

모든 에러는 다음에 설명된 표준 에러 형식을 사용합니다 API 개요.

일반적인 에러 시나리오와 응답:

// The API key cannot read this app (HTTP 401)
{
"error": "no_access_to_app",
"message": "No access to app",
"moreInfo": { "data": "6aa76066-55ef-4238-ade6-0b32334a4097" }
}
// The API key cannot read this organization (HTTP 401)
{
"error": "no_access_to_organization",
"message": "No access to organization",
"moreInfo": { "data": "6aa76066-55ef-4238-ade6-0b32334a4097" }
}
// Organization statistics require an active plan (HTTP 402)
{
"error": "subscription_required",
"message": "Organization subscription required or plan invalid",
"moreInfo": { "orgId": "046a36ac-e03c-4590-9257-bd6c9dba9ee8", "isPayingAndGoodPlan": false }
}
// User statistics when the user belongs to no organization (HTTP 401)
{
"error": "no_organizations_found",
"message": "No organizations found",
"moreInfo": { "data": "6aa76066-55ef-4238-ade6-0b32334a4097" }
}
  1. 성장 추적: 시간 경과에 따른 MAU 성장 모니터링
  2. 리소스 최적화: 스토리지 사용량을 추적하여 비용을 최적화하세요 (대역폭은 측정되지만 무제한이며 과금되지 않습니다)
  3. 용량 계획: 추세를 기반으로 향후 리소스 수요 계획
  4. 사용량 보고서: 이해관계자를 위한 정기 사용량 보고서 생성
  5. Bundle(버전) 분포 분석: bundle 사용량 통계로 다양한 앱 bundle(버전)에 대한 사용자 분포를 파악
  1. 기간 비교: 월별 또는 연별 추이 확인
  2. 비율 추적: 사용자당 대역폭 또는 앱당 저장 공간 모니터링
  3. 알림 설정: 사용량 급증 시 알림 생성
  4. 정기 백업: 과거 분석을 위해 통계를 정기적으로 내보내기
  5. Bundle(버전) 채택률: Bundle 사용량을 추적하여 새 Bundle(버전)의 채택률을 파악

통계에서 계속 이어가기

“통계에서 계속하기” 섹션

사용 중이라면 통계 저장 공간과 파일 처리를 계획하려면, 다음 항목과 연결하세요 @capgo/capacitor-data-storage-sqlite @capgo/capacitor-data-storage-sqlite의 구현 세부 사항은, @capgo/capacitor-data-storage-sqlite 사용하기 @capgo/capacitor-data-storage-sqlite 사용 시 네이티브 기능을 위해, @capgo/capacitor-file @capgo/capacitor-file의 구현 세부 사항은, @capgo/capacitor-file 사용하기 @capgo/capacitor-file 사용 시 네이티브 기능에 대해서는, 그리고 @capgo/capacitor-uploader @capgo/capacitor-uploader.의 구현 세부 사항에 대해서는

릴리스 상태, 오류 및 네이티브 빌드

“릴리스 상태, 오류 및 네이티브 빌드” 섹션

트레이드오프를 평가하려면 API 모니터링 네이티브 및 업데이터 진단, 메타데이터가 포함된 로그, 라이브 릴리스 대시보드 통계, 네이티브 빌드 상태 및 로그 스냅샷을 제공합니다. 이러한 읽기 작업은 두 계정 MCP 서버 모두에서 노출됩니다.

GET /statistics/app/:app_id/native_usage

“GET /statistics/app/:app_id/native_usage” 섹션

의 네이티브 버전 채택률과 일일 활성 기기 수를 읽습니다 from 그리고 to 날짜. 응답에는 labels, 차트 datasets, latestVersion, activeDevices, previousPeriodActiveDevices, 그리고 dailyPlatformActive.

dailyPlatformActive 는 다음을 포함하는 객체입니다 labels 는 날짜 문자열이고 android, ios, electron, unknown, 그리고 total 는 해당 날짜와 정렬된 숫자 배열입니다. 행 배열이 아닙니다. 보조 활성 기기 읽기 값은 사용할 수 없는 경우 빈 데이터로 저하될 수 있으며, 빈 값은 기기가 비활성임을 증명하지 않습니다.