All questions

Nightly job pulling Croct sessions and events into our warehouse, what does the export API give me?

Asked by ade on

Aade

Building a nightly job to land Croct data in Snowflake next to our order tables.

I need to know which endpoints exist for bulk export, how auth works, and how far back I can pull on the first run, want to backfill as much history as possible

SQL side is sorted, just need the extraction details.

Was this helpful?

1 answer

RrafaelAccepted answer

Three parts to your answer.

Endpoints: use the data-export client, which gives you exportEvents, exportSessions, and exportUserById. Events and sessions are the two you want for a nightly batch; the user export is for point lookups.

Auth: the export service is one of the documented services under the HTTP API. Base URL https://api.croct.io, API key in the X-Api-Key header. You can create a key with the CLI (croct create api-key) or from the dashboard.

Backfill depth: analytics retention is 90 days on all plans, so plan for incremental pulls from day one rather than a big one-off backfill. Your nightly job with a since-last-run watermark is the right shape; the 90-day window just means you should start it now rather than deferring, because anything older than the window is gone. After three months of nightly runs you will have continuous history in Snowflake anyway.

Was this helpful?
Still have questions?