Before you export
- You have a Sift API key and your base URLs.
- You have the ID of the Run and the IDs of the Channels you want to export. One option is to find these in the Sift UI or by querying the
ListRunsandListChannelsendpoints.
How does programmatic export work
Sift provides two programmatic export methods, data querying and export data to file, each available through the REST API and official client libraries (Python, Rust, and Go). Clients for other languages can be generated using Buf.Query Channel data
Use the REST API
To query Channel data, call theGetData endpoint.
-
Query Channel data
endTime: This field is exclusive, so a sample that falls exactly at or after
endTimeis not included in the response. If a value you expect to see is missing, try extendingendTimeslightly past the boundary you actually want.sampleMs: SetsampleMsto0, or omit it, to return the full, unsampled dataset, recommended for external data analysis. Any other value downsamples the response using LTTB, a shape-preserving algorithm intended for plotting rather than analysis; it returns approximately one representative point per that many milliseconds rather than sampling at a literal fixed interval.Timeseries Panel: The Sift app’s Timeseries Panel offers a choice of sampling methods (LTTB, Min/Max, and Changed Only), butGetDataonly supports LTTB; the other methods are not currently available through this endpoint. -
Paginate if needed
If the response includes a non-empty
nextPageToken, resend the same request withpageTokenset to that value to retrieve the next batch. Repeat untilnextPageTokencomes back empty.
Use the Python client
The official Python client provides two methods for querying Channel data:- client.channels.get_data_as_arrow() returns an Apache Arrow table. Recommended when converting data for use in other tools.
- client.channels.get_data() returns typed Python value objects.
-
Initialize the client
-
Retrieve the data
Fetch the Channel object using its ID, then call client.channels.get_data_as_arrow(). The method returns a
dictwhere each key is a Channel name and the value is an Apache Arrow table.Or using client.channels.get_data(), which returns adict[str, pd.DataFrame]directly with no conversion needed:
Export data to file
Use the REST API
To export data to a file, call theExportData and GetDownloadUrl endpoints.
-
Submit the export job
outputFormat: This is a fixed value to select, not a placeholder to replace with your own text.
-
Retrieve the download link
If the response includes a
presignedUrl, the export completed immediately and the file is ready to download. If the response includes ajobIdinstead, poll this endpoint untilpresignedUrlis populated:
Use the Python client
The official Python client provides two methods for exporting data to file:- client.data_export.export() submits the export job.
- job.wait_and_download() polls until complete, downloads, and extracts the result automatically. Returns a list of
Pathobjects pointing to the extracted files.
-
Initialize the client
-
Submit the export job and download the result