Marking a channel out of service
Toggleout_of_commission to remove a channel from the pool without deleting
it or breaking historical measurements that reference it. Every change to
out_of_commission also opens or closes a row in the channel’s
incident history, so you can look back and see
when — and why — a channel was down.
Alongside out_of_commission, pass three optional fields to describe the
outage:
These three fields only annotate a transition in
out_of_commission — they
are ignored on a PATCH that doesn’t change the flag. Re-sending the value a
channel already has is a no-op, not a new outage.
out_of_commission regardless of any
in-flight measurement.
out_of_commission cannot be set at channel creation — the create endpoint
rejects it with a BAD_REQUEST. Create the channel first, then PATCH it to
take it out of service so the outage is recorded in the incident history.CONFLICT (HTTP 409) — close the measurement first (patch its end_time).
Use incident_category of decommissioned for a permanent retirement rather
than a repair-in-progress: the incident stays open indefinitely and is excluded
from repair-time statistics.
Channel incident history
Every transition ofout_of_commission is recorded as an incident — one
row per outage, opened when the channel goes down and closed when it comes
back. Use the history to audit downtime, attribute outages to a cause, or
compute per-channel mean time to repair.
At most one incident can be open per channel at a time (the current outage).
Sending out_of_commission: true for a channel that’s already down is a no-op
— it does not fragment the existing outage into a new row.
Incident fields
Reading incident history
List a channel’s incidents through the HTTP API, most recently started first:limit (1–100, default 20) and offset to page through longer histories;
total is the full count, not the page size.
The channel’s current outage is the one with resolved_at set to None — at
most one can be open:
is_overdue_to_return is derived when you ask rather than stored, because
overrunning a booked window is a plan being wrong rather than a record being
invalid. A resolved outage is never overdue, however late it was.
Channels that already existed before incident history was introduced have a
single backfilled row with
is_estimated: true. Its started_at is the
channel’s last-modified time and is only an upper bound on when the outage
actually began — treat those rows as “we know it was down by this time” and
skip them when computing repair-time statistics.Servicing a whole cycler
Calibration and preventive maintenance are performed on the instrument, so a 40-channel cycler going in for its annual calibration is one event — not 40 unrelated channel outages. Use the cycler service methods rather than marking each channel out of service by hand. Event types arecalibration, preventive_maintenance, firmware, repair,
and other.
Taking a cycler out of service
start_service opens one event and an incident on every channel of the
cycler, so the whole instrument reads as down:
scheduled_for is required — a cycler must not sit out of service with no date
attached. scheduled_until is optional and says when the instrument is expected
back, turning the booking into a span rather than a start instant; when given it
must be after scheduled_for. It is a plan, not a promise: a visit that runs
past it is recorded as overdue, not rejected. Channels already out of service for their own faults keep their more
specific incident and stay out when the service completes.
Recording service as done
complete_service takes two paths depending on whether the cycler is currently
out of service:
For a
calibration event this also advances the cycler’s last_calibrated_at,
and therefore calibration_due_at. That is the only supported way the
calibration clock moves.
Reading service history
performed_at is None is the current service.
A cycler that is in service reports as unavailable, so scheduling a
measurement on it fails when you schedule rather than at the bench.
Next steps
Equipment
Sites, cyclers, channels, and how measurements link to them.
Lab view
Live channel occupancy for the project.