ReferenceClientRanges

Ranges

Organizing telemetry data with time-based ranges and metadata.

Ranges are named time intervals that organize telemetry into tests, runs, and events, and carry metadata about them.

Range Parameters

Table

Parameter Type Required Default Description
name string Yes - Human-readable name for the range
time_range TimeRange Yes - Time interval spanned by the range (start must be ≤ end)
color string No "" Hex color code for identifying the range in visualizations (e.g., "#FF0000")
key UUID No Auto Unique identifier (automatically generated by Synnax if not provided)
parent Range No None Optional parent range. Pass the parent Range itself.
retrieve_if_name_exists boolean No False If True, retrieves existing range with same name and time range instead of creating a duplicate. Python only.

TypeScript does not support conditional range creation.

Create a Range

Create Child Ranges

Child ranges segment a range into smaller intervals.

Retrieve Ranges

Single

Retrieve a range by its name or key. Synnax will raise a NotFoundError if the range does not exist, and a MultipleFoundError if multiple ranges with the given name exist.

Multiple

Retrieve multiple ranges by passing a list of names or keys. When retrieving multiple ranges, Synnax will not raise an error if a range cannot be found. Instead, the missing range will be omitted from the returned list.

Child

If a range has child ranges, you can retrieve them directly from the parent range.

Parent

Navigate up the hierarchy by retrieving a child range’s parent.

Update a Range

To update an existing range, use the same client.ranges.create method but specify the key of the range to update. This allows modification of the range’s name, time range, or color.

When updating a range, you must provide the key parameter. If you provide a key that doesn’t exist, Synnax will create a new range with that key instead of raising an error.

Updating a range will completely replace its properties. Make sure to include all the properties you want to keep, not just the ones you want to change.

Metadata

Ranges can store metadata as key-value pairs. This is useful for attaching information like test configuration parameters, numeric results, or part numbers.

All metadata values are stored as strings. It’s up to you to correctly cast the values to the appropriate type.

Set

Get

Delete

Labels

Labels categorize and filter ranges.

Read from a Range

Ranges provide a convenient way to read data without specifying exact time boundaries. Once you have a range, you can read channel data directly from it.

Read by Alias

Once you’ve set an alias, you can access the channel using that alias.

Write to a Range

Writing to a range removes the burden of needing to correctly align the timestamps for different channels. The write will assume that the timestamp of the first sample is the start of the range.

Delete a Range