REST API
Base URL: https://api.pulsark.org. Machine-readable description: OpenAPI 3.1.
Authentication
Section titled “Authentication”Every request needs a platform key:
Authorization: Bearer dak_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxapp_id |
Platform key dak_… |
|
|---|---|---|
| Used by | The SDK | Your servers, scripts, AI assistants |
| Secret? | No — it ships in your APK | Yes — shown once, stored only as a hash |
| Scope | One app | An organization, optionally limited to one project |
Keys carry scopes; give each key the least it needs. An AI assistant only needs metrics:read.
| Scope | Allows |
|---|---|
metrics:read |
Query metrics, list metric definitions, use the MCP server |
apps:read |
List projects and apps |
apps:write |
Create projects and apps, rename or disable apps |
keys:write |
List, create and revoke keys |
Store keys in an environment variable such as PULSARK_KEY. Revoke a leaked key immediately with DELETE /api/v1/keys/{id}.
Resources
Section titled “Resources”Organization └─ Project a data boundary, e.g. "Puzzle games" └─ App one APK / package, identified by app_idA key can only see apps in its organization (or its project). Asking for an app you cannot see returns 404.
Metrics
Section titled “Metrics”List metrics
Section titled “List metrics”curl -H "Authorization: Bearer $PULSARK_KEY" https://api.pulsark.org/api/v1/metricsReturns name, title, unit, notes and allowed dimensions for every metric in the catalog.
Query a metric
Section titled “Query a metric”GET /api/v1/metrics/{name}
| Parameter | Default | Description |
|---|---|---|
app_id |
all visible apps | Comma-separated app IDs |
from, to |
last 30 days | YYYY-MM-DD, Singapore statistical days, inclusive. Max 400 days. |
group_by |
— | Up to 2 dimensions, comma-separated |
filter |
— | dimension:value1,value2; repeat for several dimensions |
curl -H "Authorization: Bearer $PULSARK_KEY" \ "https://api.pulsark.org/api/v1/metrics/est_arpdau?from=2026-11-01&to=2026-11-30&group_by=country&filter=country:ID,IN,BR,VN"{ "metric": { "name": "est_arpdau", "title": "预估 ARPDAU", "unit": "USD", "notes": ["…"], "dimensions": ["app_id", "country", "app_version", "build_channel"] }, "from": "2026-11-01", "to": "2026-11-30", "group_by": ["country"], "rows": [ { "date": "2026-11-01", "country": "ID", "value": 0.0123 } ], "data_freshness": "2026-12-01 03:00:12", "timezone": "Asia/Singapore"}data_freshness is the UTC time of the most recent aggregation in the range; an empty string means nothing has been aggregated yet.
| Method | Path | Scope | |
|---|---|---|---|
GET |
/api/v1/projects |
apps:read |
List projects |
POST |
/api/v1/projects |
apps:write |
{"name": "…"} |
GET |
/api/v1/apps |
apps:read |
List apps |
POST |
/api/v1/apps |
apps:write |
Register an app, returns its app_id |
PATCH |
/api/v1/apps/{app_id} |
apps:write |
{"name": "…"} or {"status": "disabled" | "active"} |
curl -X POST -H "Authorization: Bearer $PULSARK_KEY" -H "Content-Type: application/json" \ -d '{"project_id": "prj_xxxxxxxxxxxx", "name": "Bubble Pop", "package_name": "com.example.bubblepop", "profile": "GAME"}' \ https://api.pulsark.org/api/v1/appsA disabled app’s events are rejected within a minute. App IDs are never reused.
| Method | Path | Scope | |
|---|---|---|---|
GET |
/api/v1/keys |
keys:write |
List keys (prefix, scopes, last used — never the key itself) |
POST |
/api/v1/keys |
keys:write |
{"name": "claude", "scopes": ["metrics:read"], "project_id": "…"} — the key is in the response once |
DELETE |
/api/v1/keys/{id} |
keys:write |
Revoke immediately |
A key can only grant scopes it has itself.
Errors
Section titled “Errors”Errors return JSON {"error": "…"} with a human-readable message (currently in Chinese for some endpoints; the status code is the contract).
| Status | Meaning |
|---|---|
| 400 | Invalid parameter — the message says which |
| 401 | Missing, invalid or revoked key |
| 403 | The key lacks the required scope |
| 404 | Not found, or not visible to this key |
| 502 | Temporary query failure — retry |
Every metrics query and every change to apps or keys is recorded in your organization’s audit log.