Statistics
The Statistics API reports React Native live-update adoption and resource usage. Use it to track bundle rollout, monthly active devices, storage, and bandwidth across apps and organizations.
Admin API requests use:
Authorization: Bearer <CODEPUSHGO_API_KEY>Base URL:
https://api.codepushgo.comMetrics
- MAU: unique devices that checked for updates during the selected period.
- Storage: bytes stored for uploaded JavaScript bundles and metadata.
- Bandwidth: bytes transferred for update downloads.
- Bundle usage: version adoption by app and date range.
GET /statistics/app/:app_id/
Get statistics for one React Native app id.
curl -H "Authorization: Bearer $CODEPUSHGO_API_KEY" \ "https://api.codepushgo.com/statistics/app/com.demo.app/?from=2024-01-01&to=2024-02-01"Example response:
[ { "date": "2024-01-01", "mau": 1500, "storage": 536870912, "bandwidth": 1073741824 }]GET /statistics/org/:org_id/
Get organization-level usage.
curl -H "Authorization: Bearer $CODEPUSHGO_API_KEY" \ "https://api.codepushgo.com/statistics/org/org_123/?from=2024-01-01&to=2024-02-01"GET /statistics/user/
Get aggregate usage across organizations available to the current API key.
curl -H "Authorization: Bearer $CODEPUSHGO_API_KEY" \ "https://api.codepushgo.com/statistics/user/?from=2024-01-01&to=2024-02-01"GET /statistics/app/:app_id/bundle_usage
Get version adoption for a React Native app.
curl -H "Authorization: Bearer $CODEPUSHGO_API_KEY" \ "https://api.codepushgo.com/statistics/app/com.demo.app/bundle_usage?from=2024-01-01&to=2024-02-01"Example response:
{ "labels": ["2024-01-01", "2024-01-02"], "datasets": [ { "label": "1.0.0", "data": [60.5, 58.2] }, { "label": "1.0.1", "data": [39.5, 41.8] } ]}Best Practices
- Watch bundle usage during staged rollouts before moving to 100%.
- Compare iOS and Android app ids separately when they use different native bundle ids.
- Use organization stats for billing and capacity planning.
- Use app stats to verify that devices are adopting the expected channel bundle.