Adventure Labs Logo
Scout Docs

Sessions

Table for recording time bound slices of data

Column NameData TypeConstraints
idbigintNOT NULL
device_idbigintNOT NULL
base_device_idbigint
base_device_software_versiontext
battery_idbigint
secondary_battery_idbigint
post_approveruuid
timestamp_starttimestamp with time zoneNOT NULL
timestamp_endtimestamp with time zone
inserted_attimestamp with time zoneDEFAULT "now"() NOT NULL
software_versiontextNOT NULL
locationsextensions.geography
altitude_maxdouble precisionNOT NULL
altitude_mindouble precisionNOT NULL
altitude_averagedouble precisionNOT NULL
velocity_maxdouble precisionNOT NULL
velocity_mindouble precisionNOT NULL
velocity_averagedouble precisionNOT NULL
distance_totaldouble precisionNOT NULL
distance_max_from_startdouble precisionNOT NULL

Security Policies (RLS)

RLS enabled. Herd scope: Herd from sessions.device_id → get_herd_id_by_device_id.

Operationhas_herd_ability ability keyOther paths
SELECTsessions.readOwning device API key
INSERTsessions.writeOwning device API key; approved gateway in herd
UPDATEsessions.writeOwning device API key; approved gateway in herd
DELETEsessions.writeOwning device API key

Platform superadmin: FOR ALL bypass where defined.

On this page