Edit and delete ranges
Rename a range, change its times or stage, and delete it.
Rename a range, change its times or its stage, or delete it. To change labels and metadata, see metadata and labels.
Rename a range
Console
Python
TypeScript
Right-click the range in the ranges toolbar or the range explorer and select Rename. You can also click the name on the range overview.
client.ranges.rename(my_range.key, "My Updated Range")await client.ranges.rename(myRange.key, "My Updated Range");Change the times or the stage
Console
Python
TypeScript
Arc
On the range overview, click the start or end time on the timeline and change it. To start, complete, or reopen the range, click its stage. Each stage change sets the start or end time. See stages.
The Console cannot change the color or the parent of a range.
Call client.ranges.create with the key of the range:
from datetime import datetime
import synnax as sy
my_range = client.ranges.retrieve(name="My Range")
client.ranges.create(
key=my_range.key,
name="My Updated Range",
time_range=sy.TimeRange(
start=sy.TimeStamp(datetime(2023, 2, 12, 13, 0)),
end=sy.TimeStamp(datetime(2023, 2, 12, 15, 0)),
),
color="#00FF00",
)Call client.ranges.create with the key of the range:
import { TimeRange, TimeStamp } from "@synnaxlabs/client";
const myRange = await client.ranges.retrieve("My Range");
await client.ranges.create({
key: myRange.key,
name: "My Updated Range",
timeRange: new TimeRange(
new TimeStamp("2023-02-12 13:00:00"),
new TimeStamp("2023-02-12 15:00:00"),
),
color: "#00FF00",
});An automation can only end a range that it created. ranges.end sets the end to the
current time. Give it the key that ranges.create output:
import ranges
sequence test {
run_key str $= ""
stage idle {
start_cmd == 1 => run
}
stage run {
ranges.create{name="Hotfire", color="#3bc454"} -> run_key
stop_cmd == 1 => done
}
stage done {
ranges.end{key=run_key}
start_cmd == 1 => run
}
}
true => testSee create ranges in Arc.
An update from Python or TypeScript replaces the name, the time range, and the color. Leave out the color and the range loses it. Labels are only added, and the parent stays when you leave it out. If no range has the key, Synnax creates a new range with that key.
Delete a range
Deleting a range also deletes its child ranges. It does not delete the data of the channels in the range, and it does not delete its snapshots.
Console
Python
TypeScript
Right-click the range in the ranges toolbar or the range explorer and select Delete, then confirm.

client.ranges.delete(my_range.key)
client.ranges.delete([my_range.key, my_other_range.key])A key that matches no range is ignored.
await client.ranges.delete(myRange.key);
await client.ranges.delete([myRange.key, myOtherRange.key]);