Palbase Analytics · API
/analytics/perfSend performance samples
Up to 100 samples (512 KiB): app starts, screens, network calls, web vitals, custom measures. Each is kept or dropped on its own — a bad shape, a time more than 7 days off, or not sampled in at the project's rate — and the answer counts both: dropping is the server's call, not an error. The request is answered once what it sends is kept — on the platform's stream, written to the store within seconds, even while the store is restarting. A signed-in user's token (with the publishable key) makes it theirs: their user id is the distinct id, whatever the body says.
Called by your app, with the publishable key; or a signed-in user of your app, with their token and the publishable key; or your server, with the project's secret key.
Headers
Idempotency-Keystring · optionalThe request's key: the same key sent again within two minutes is not kept twice.X-Palbase-Client-Versionstring · optionalThe app's version: kept with what it sends.X-Platformstring · optionalThe app's platform (ios, android, web).X-OS-Versionstring · optionalThe operating system's version.Request body
itemsobject[] · required100 at most; more are dropped.curl -X POST "https://<your-ref>.palbase.studio/analytics/perf" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"items":[{"name":"string","row_id":"string","timestamp":0,"trace_type":"string","value":0}]}'Responses
202What was kept and dropped
400The request is malformed, or what it sends breaks a limit (the error names which: the SDKs' codes)
401No key, or not a key of this project, or a token that is not valid (the edge's answer)
413The body is over this operation's limit (payload_too_large), or an upload's record or batch is (record_too_large, batch_too_large)
429The project is sending analytics faster than its per-second limit (rate_limited), or its quota for the period is used up (quota_exceeded); Retry-After says when to try again
503The platform could not take or answer this now; nothing was kept, and retrying is safe (Retry-After)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation SendPerf of analytics's contract.