requested (with an estimated duration but
no channel); a scheduler later assigns a channel and a
[planned_start_time, planned_end_time) window, moving it to scheduled.
Planned measurements never create or mutate a real
cell measurement. When the real test starts, the actual
cell_measurement links back to the plan and moves it to in_progress — the
planned row stays as the request-and-schedule audit trail.
When to use it
Planned measurements are optional — you can still create measurements directly and setchannel_id at run time as described in the
Lab view. Use planned measurements when you want to:
- Track a backlog of tests requested against a project or a specific cell specification.
- Reserve future channel time so two schedulers don’t book the same channel and window.
- Separate the request (from a scientist or PM) from the scheduling decision (from a lab operator).
- Keep an audit trail of who requested and scheduled each test.
Lifecycle
Scheduling is fully manual — the scheduler picks the channel and times.
There is no automatic optimizer.
Reserving future channel time on a
scheduled plan does not make the
Lab view show the channel as occupied — only a running real
measurement does that. A plan reserves the calendar; a cell_measurement
reserves the current moment.
Fields
Names are unique per project (case-insensitive). Creating a plan with a
duplicate name raises
IonworksError with error_code == "CONFLICT" (HTTP
409). Use create_or_get to make creation idempotent.
Requesting a measurement
Create arequested plan with no channel; supply an estimated duration and,
optionally, the cell specification you want tested. The scheduler picks the
concrete instance later.
create_or_get to make the request idempotent by name:
Scheduling onto a channel
Assign a channel and a time window withschedule — a convenience wrapper
that moves a requested plan to scheduled.
scheduled in one call:
Cancelling or completing an existing plan is always allowed, even after the
channel goes out of commission.
Listing and filtering
list is project-scoped and returns a PaginatedList[PlannedMeasurement].
Filter by lifecycle status, channel, or name.
Updating, cancelling, and deleting
schedule again with a new channel or window (or
update the individual fields). The server re-runs the overlap and
out-of-commission checks against the new values.
Linking a real measurement to a plan
You do not transition a plan toin_progress by hand. When the real run
starts, create the cell_measurement with planned_measurement_id set —
the backend links it and moves the plan to in_progress atomically.
- The plan is
scheduled. - The measurement is a
time_seriesmeasurement and carries achannel_id(aplanned_measurement_idwith nochannel_idis rejected). - The plan and measurement are in the same project and organization.
- The measurement’s
channel_idequals the plan’schannel_id. - If the plan has a
cell_instance_id, the measurement must run on that same cell instance.
status = scheduled, so the loser is left
unlinked (and logged as a warning).
After linking, channel occupancy on the Lab view is driven by
the running cell_measurement. The planned row remains as the audit trail.
Permissions
Planned measurement endpoints reuse the existingcell_measurement
permissions:
project_id
All client.planned_measurement.* methods accept an optional project_id.
When omitted it falls back to the project_id configured on the
Ionworks client (or the IONWORKS_PROJECT_ID env var).
Methods raise ValueError if no project_id is available from any source.
Next steps
Lab view
Set up the sites, cyclers, and channels that planned measurements schedule onto.
Measurements
Create the real
cell_measurement that links back to a scheduled plan.