Skip to content

Ingest API (v1)

The SDK calls these endpoints; you only need them to write an adapter for another platform or to debug uploads. Base URL for Quameleon Cloud: https://quameleon.qualgent.ai.

All device requests authenticate with the project API key in x-quameleon-key. The environment comes from the key. Requests are rate-limited per key (50 requests per second, burst 200); over the limit the server answers 429 with Retry-After.

Uploads one batch of signals for one session.

POST /v1/ingest
content-type: application/json
content-encoding: gzip
x-quameleon-key: qmk_live_…
{
"session_id": "6f0c…",
"user_session_id": "a91e…",
"device_id": "0b7d3c1e-…",
"distinct_id": "user_8412",
"platform": "android",
"adapter": "react-native",
"sdk_version": "0.5.0",
"device": { "manufacturer": "Google", "model": "Pixel 9", "os": "android", "os_version": "16", "locale": "en-US" },
"app": { "id": "com.acme.app", "version": "1.4.2", "build": "142" },
"key": "<base64 RSA-OAEP-wrapped data key> | null",
"signals": [ { "seq": 1, "e": "<base64 iv ‖ ciphertext ‖ tag>" } ]
}

With no public key, key is null and signals holds plain envelopes (see Signals).

Status Meaning SDK behavior
200 { "accepted": n, "duplicates": n, "rejected": n } acks the batch
400 malformed batch drops the batch
401 / 403 unknown or revoked key stops uploading for this process
409 the session belongs to another project drops the batch
413 more than 1000 signals or 5 MB gzipped drops the batch
408, 429, 5xx transient retries with backoff min(10 min, 5 s · 2^(n−1)) × jitter 0.5–1.5; Retry-After wins

Ingest is idempotent: the server dedupes on (session_id, seq), so retries are safe.

Uploads sampled replay frames, after the session’s signal batches. Same headers and batch header as /v1/ingest, followed by "frames": [lines], at most 20 frames per request. Each line is the JSON of a replay.frame or layout frame, or {"frame": N, "e": "…"} when encrypted. The server dedupes on (session_id, frame).

GET /v1/config?platform=android&app_version=1.4.2&sdk_version=0.5.0
x-quameleon-key: qmk_live_…
{
"enabled": true,
"sample_rate": 1,
"upload_interval_ms": 30000,
"config": { "console": true },
"replay": { "enabled": true, "sample_rate": 0.1, "fps": 1, "max_width": 360, "quality": 0.4 }
}

See Sampling and remote config.

GET /healthz is liveness. GET /readyz also checks the database.