Skip to content
Console
On this page

sylphx analytics analytics_events

Every sylphx analytics analytics_events command: its argument, its flags and a run line.

The analytics_events commands of Sylphx Analytics, as the CLI spells them: the same calls as the analytics_events API page, typed for the shell. Install, sign in and the grammar are on the CLI index.

batch

Records a batch of events. Each event is judged alone: a bad event is reported in results and the rest are stored. A duplicate event_id (in this or an earlier batch) is counted once. The response is sent only after the store holds the accepted events.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx analytics analytics-events batch orgs/acme/projects/shop/envs/production

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/analytics_events:batch · scope analytics:ingest · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--eventsjsonThe events, 1 to 500. Required. Repeat the flag for each value.
--sent-timetimestampWhen the sender built the batch, on its clock. When it differs from the receive time by more than 10 minutes, every event time is shifted by the difference.
--consentenumThe app's current analytics consent; events are stored only when GRANTED. A publishable-key batch that is not GRANTED has every event rejected consent_not_granted (still 200, nothing stored). A secret-key batch with UNSPECIFIED counts as granted (the tenant's server attests); DENIED is always refused. One of granted, denied.

list

Lists the environment's raw events in a time range, newest first.

PARENT — optional: the CLI fills it from the linked project or the key's scope when it is left out.

CLI

Shell
sylphx analytics analytics-events list orgs/acme/projects/shop/envs/production

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/analytics_events · scope analytics:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--start-timetimestampThe interval start; required, at most 31 days before end_time. Required.
--end-timetimestampThe interval end; default now.
--event-namestringOnly events with this name.
--subject-idstringOnly events of this subject (the user id, else the anon id).
--page-sizeintAt most this many; default 100, clamped to 1000.
--page-tokenstringnext_page_token of the previous page; bound to the tenant, interval and filters.

query

Aggregates deduplicated events in the environment over a bounded interval.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx analytics analytics-events query orgs/acme/projects/shop/envs/production

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/analytics_events:query · scope analytics:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--start-timetimestampInclusive start of the interval, at most 31 days before end_time. Required.
--end-timetimestampExclusive end of the interval; defaults to now.
--rollupjsonTime buckets, counts, and an optional property sum. Set exactly one of rollup, funnel, retention, active_users, sessions, or paths.
--funneljsonOrdered conversion steps.
--retentionjsonCalendar cohorts and exact or unbounded subject retention by period.
--active-usersjsonExact distinct active subjects in calendar or daily trailing windows.
--sessionsjsonSession count and exact median duration by session start day.
--time-zonestringCase-sensitive IANA reporting time zone for calendar buckets; defaults to UTC. Bucket starts are UTC instants; the query interval, funnels, and paths are unchanged.
--pathsjsonRanked event sequences before or after an anchor in each session.
--traffic-filterenumApplies to every query leg. Default exclude_internal_qa retains customer and unknown traffic. Use all to include QA, or verified_customer_only to include only server-attested customer traffic. One of all, exclude_internal_qa, verified_customer_only.