Skip to content
SENS Platform Docs

Export Contract V1

Draft. The TypeScript DTO foundation is defined in @sens-platform/contracts, but export API endpoints and storage behavior are not implemented yet.

Exports allow users to retrieve telemetry data as CSV.

Exports should be asynchronous.

A user creates an export job. The platform processes the job in the background. The user can later download the result if authorized.

V1:

  • csv

Future:

  • JSON
  • Parquet
  • Excel if explicitly justified

Exports must be scoped by:

  • Tenant.
  • Organization access.
  • Device access.
  • Time range.
  • Measurement keys where relevant.

Typical exports may cover up to one year of data.

Users may only export data they are authorized to view.

Export creation and download should be audit logged.

The draft DTO names are:

  • CreateTelemetryExportRequestDto
  • ExportJobDto
  • ExportJobResultDto
  • ExportJobFailureDto
  • ExportFormat
  • ExportJobStatus

ExportFormat is fixed to csv for V1.

ExportJobStatus currently allows:

  • queued
  • processing
  • completed
  • failed
  • expired

The DTOs do not decide export file storage, retention, or download URL shape.

  • Maximum export range.
  • Export retention.
  • Export file storage.
  • CSV column format.
  • Compression.