Skip to content

statistic

앱 및 조직에 대한 세부적인 분석을 제공하는 Statistics 엔드포인트입니다. 앱 성장, 리소스 사용, 용량 계획을 위해 월간 활성 사용자(MAU), 저장소 사용량, 대역폭 소비를 추적할 수 있습니다. 이 데이터는 다양한 시간 기간에 걸쳐 다양한 시간 기간에 걸쳐 추적할 수 있습니다.

  • 월간 활성 사용자(MAU): 30일 동안 앱에 접근한 유니크한 기기 수
  • 저장소: 모든 번들 및 리소스의 총 크기(바이트)
  • 대역폭: 번들 다운로드를 위한 총 데이터 전송량(바이트)

최선의 방법

최선의 방법
  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)
}

Cost Management

예시 요청 섹션
터미널 창
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
}
]

GET /statistics/user/

GET /statistics/user/ 섹션

사용자에게 제공하는 모든 조직에 대한 집계 통계를 가져옵니다. 전체적인 사용량 모니터링에 적합합니다.

쿼리 매개변수

쿼리 매개변수 섹션
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 섹션

특정 앱에 대한 버전별 사용자 분포를 포함하여 지정된 기간 동안 버블 사용 통계를 가져옵니다.

쿼리 매개변수

Query Parameters
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]
}
]
}

오류 처리

오류 처리

일반 오류 상황과 그 응답:

// 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. 성장 추적: 시간에 따른 MAU 성장 모니터링
  2. 리소스 최적화: 저장소 및 대역폭 사용량을 최적화하여 비용을 절감하는 데 사용
  3. 용량 계획: 미래의 리소스 요구를 계획하기 위해 트렌드를 사용
  4. 사용 보고서: 주기적인 사용 보고서를 이해 당사자에게 생성
  5. 버nd (버전) 배포 분석: 사용자 분포를 앱 버전별로 이해하는 방법 (bundle 사용 통계)
  1. 비교 기간: 월간 또는 연간 트렌드 보기
  2. 비율 추적: 사용자당 대역폭 또는 앱당 저장 용량 추적
  3. 경보 설정: 사용량에 이상한 급증을 위한 경보 설정
  4. 정기 백업: 통계를 정기적으로 내보내기 (역사 분석)
  5. 버전 (버전) 채택: 사용량을 통해 새로운 버전의 패키지 수용률을 추적하세요.

Capgo를 사용하는 경우 Statistics Capgo를 사용하여 저장소 및 파일 처리를 계획하고자 할 때, @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-data-storage-sqlite와 연결하세요. Capgo를 사용하여 @capgo/capacitor-data-storage-sqlite의 구현 세부 정보를 확인하세요. @capgo/capacitor-data-storage-sqlite를 사용하여 Capgo의 내장 기능을 사용하세요. @capgo/capacitor-file를 사용하여 Capgo의 구현 세부 정보를 확인하세요. @capgo/capacitor-file를 사용하여 Capgo의 내장 기능을 사용하세요. Capgo를 사용하여 파일 처리를 계획하고자 할 때, @capgo/capacitor-file와 연결하세요. Capgo를 사용하여 @capgo/capacitor-file의 구현 세부 정보를 확인하세요. Using @capgo/capacitor-파일을 사용하세요. for the native capability in Using @capgo/capacitor-파일, and @capgo/capacitor-업로더 for the implementation detail in @capgo/capacitor-업로더.