Docs
Have a token? Manage tokens in the console
POST
/v1/trails/recordings

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.

Authorization

bearer
headerAuthorizationBearer <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.

Header Parameters

idempotency-key?string

Makes 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.

Length1 <= length <= 255

Request Body

iohr.trails.v1.UploadRecordingRequest; path variables override their fields

application/json
  1. body

iohr.trails.v1.UploadRecordingRequest

client?string
dropped?integer
Formatint32
events?array<>
site?string
started_at?string

Response Body

iohr.trails.v1.UploadRecordingResponse

application/json
  1. response

iohr.trails.v1.UploadRecordingResponse

recording?

iohr.trails.v1.Recording

rejected*integer
Formatint32
import { 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}