data
sleep

Return sleep cycles aggregated by a specified period.

Process raw sleep data samples aggregated sleep stage durations per period.

get/data/v0/{fulcra_userid}/sleep_agg

Request

  • Base URL: https://api.fulcradynamics.com
  • URL: https://api.fulcradynamics.com/data/v0/{fulcra_userid}/sleep_agg
  • Auth: HTTP bearer

Path parameters

fulcra_useridstring uuid required

Query parameters

start_timestring date-time required

The starting timestamp in ISO8601 format (inclusive)

Example:2024-11-15 00:00:00Z
end_timestring date-time required

The ending timestamp in ISO8601 format (exclusive)

Example:2024-11-16 00:00:00Z
output'ndjson' | 'jstable' | 'jscolumns' | 'arrow' | 'arrowraw' | 'parquet' | 'csv' | 'quotecsv' required

The output format to generate.

cycle_gapstring duration

Minimum time interval separating distinct cycles.

stagesinteger[] nullable

Sleep stages to include. Defaults to all stages.

gap_stagesinteger[] nullable

Sleep stages to consider as gaps in sleep cycles.

clip_to_rangeboolean

Whether to clip the data to the requested date range. This is always done when requesting data for a user other than the authenticated user.

mode'start' | 'end' | 'split'

Whether to use the cycle start or cycle end to assign cycles to periods, or to split sleep stage intervals at period boundries.

periodstring

The period start and interval represented with the polars string language (see https://docs.pola.rs/api/python/dev/reference/expressions/api/polars.Expr.dt.truncate.html).

agg_functionsAggregateFunction[]

Aggregations to return.

tzstring

IANA time zone to return results in

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.