Keep one recording in the account: the site's host, the client (extension or script), when it started, the client's drop count and 1 to 5000 events, at most 256 KiB. The service checks every event against the kinds and fields the recorder sends and drops the rest, counted in rejected; names and messages are scrubbed again. 500 uploads per account per day; kept 90 days.
Needs scope trail:write.
bearerAuthorizationBearer <token>An access token from the identity provider: a person's, or a customer's from the client credentials grant with an API key (docs.inorbit.hr). The gateway verifies it; the audience is iohr-api.
idempotency-key?stringMakes a retry safe: a repeat with the same key and the same body within a day answers what the first call did (with Idempotency-Replayed: true) instead of running again; the same key with another body is 422 unprocessable. 1 to 255 visible characters; a UUID is a good one.
1 <= length <= 255iohr.trails.v1.UploadRecordingRequest; path variables override their fields
application/json- body
iohr.trails.v1.UploadRecordingRequest
client?stringdropped?integerint32events?array<>site?stringstarted_at?stringiohr.trails.v1.UploadRecordingResponse
application/json- response
iohr.trails.v1.UploadRecordingResponse
recording?iohr.trails.v1.Recording
rejected*integerint32import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try { const { value } = await api.trails.uploadRecording({ client: "<client>", site: "<site>", started_at: "<started_at>", }); console.log(value);} catch (e) { if (!(e instanceof ApiError)) throw e; console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`);}npm install @inorbithr/sdk. Calls the package's public surface; an operation newer than your package needs the next release or a client generated for your account. The SDKs.
{ "recording": { "account_id": "string", "bytes": 0, "client": "string", "created_at": "string", "created_by": "string", "dropped": 0, "duration_ms": 0, "event_count": 0, "events": [ { "fields": { "property1": { "bool_value": true, "list_value": { "values": [ {} ] }, "null_value": "NULL_VALUE", "number_value": 0.1, "string_value": "string", "struct_value": {} }, "property2": { "bool_value": true, "list_value": { "values": [ {} ] }, "null_value": "NULL_VALUE", "number_value": 0.1, "string_value": "string", "struct_value": {} } } } ], "pages": 0, "recording_id": "string", "rejected": 0, "site": "string", "started_at": "string" }, "rejected": 0}Get a recording GET
One recording with its events, each `{k, t, ...fields}`: pages, clicks with a role, a name and a selector, scroll depth, focus and visibility, timings and the Core Web Vitals, long tasks, scrubbed errors, rage and dead clicks. Never anything typed. Needs scope `trail:read`.
Delete a recording DELETE
The recording and its events are deleted at once. Needs scope `trail:write`.