API Reference (Leader /api)
Conventions
- Only the leader Pioreactor has the
/apiendpoints exposed. - Async endpoints return
202 Acceptedwith atask_idandresult_url_path. - Poll
GET /unit_api/task_results/{task_id}untilstatusiscompleteorfailed. $broadcastmay be used in path parameters where documented to target all units/workers.- File download endpoints return binary bodies; use the response content-type to handle them.
- Path parameters are shown inline in the endpoint URL.
- Request/response examples are the canonical shapes; omit optional fields you do not need.
- Errors have the following schema:
{
"error": "Human-readable error message",
"error_info": {
"cause": "Human-readable cause (defaults to error if not set)",
"remediation": "Suggested fix or next step",
"status": integer,
}
}
Use /api/workers/... for worker-only targets (experiment-scoped jobs/logs) and /api/units/... when the leader is also a valid target; both accept $broadcast where supported.
Get Models
Returns the list of supported Pioreactor models.
Endpoint
GET /api/models
Response
Success
Status: 200 OK
{
"models": [
{
"model_name": "pioreactor_20ml",
"model_version": "1.5",
"display_name": "Pioreactor 20 mL"
}
]
}
Stop All Jobs On Worker For Experiment
Stops all jobs for a worker within an experiment.
Endpoint
POST /api/workers/{pioreactor_unit}/jobs/stop/experiments/{experiment}
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Worker unit name or $broadcast. |
| experiment | string | Yes | Experiment identifier. |
Response
Success
Status: 202 Accepted
{
"status": "success"
}
Stop Specific Job On Unit
Stops a specific job on a unit within an experiment.
Endpoint
POST /api/units/{pioreactor_unit}/jobs/stop/job_name/{job_name}/experiments/{experiment}
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name. |
| job_name | string | Yes | Job name to stop. |
| experiment | string | Yes | Experiment identifier. |
Response
Success
Status: 202 Accepted
{
"status": "success"
}
Run Job On Unit In Experiment
Runs a job on one or more units assigned to an experiment.
Endpoint
POST /api/units/{pioreactor_unit}/jobs/run/job_name/{job_name}/experiments/{experiment}
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name or $broadcast. |
| job_name | string | Yes | Job name to run. |
| experiment | string | Yes | Experiment identifier or universal. |
Request Body
{
"options": {
"target_rpm": "200"
},
"env": {
"JOB_SOURCE": "user"
},
"args": ["--some-flag"],
"config_overrides": [["stirring.config", "pwm_hz", "100"]]
}
Response
Success
Status: 202 Accepted
{
"unit": "leader",
"task_id": "task_abc123",
"result_url_path": "/unit_api/task_results/task_abc123"
}
Get Jobs Running
Returns running jobs for a unit or the cluster.
Endpoint
GET /api/units/{pioreactor_unit}/jobs/running
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name or $broadcast. |
Response
Success
Status: 202 Accepted
{
"unit": "leader",
"task_id": "task_abc123",
"result_url_path": "/unit_api/task_results/task_abc123"
}
Blink Worker
Triggers a brief blink on a worker to confirm connectivity.
Endpoint
POST /api/workers/{pioreactor_unit}/blink
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Worker unit name. |
Response
Success
Status: 202 Accepted
{
"status": "success"
}
Update Job On Unit
Updates job settings for a running job via MQTT.
Endpoint
PATCH /api/workers/{pioreactor_unit}/jobs/update/job_name/{job_name}/experiments/{experiment}
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name or $broadcast. |
| job_name | string | Yes | Job name to update. |
| experiment | string | Yes | Experiment identifier. |
Request Body
{
"settings": {
"target_rpm": "200"
}
}
Response
Success
Status: 202 Accepted
{
"status": "success"
}
Reboot Unit
Queues a reboot on a unit or cluster.
Endpoint
POST /api/units/{pioreactor_unit}/system/reboot
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name or $broadcast. |
Response
Success
Status: 202 Accepted
{
"unit": "leader",
"task_id": "task_abc123",
"result_url_path": "/unit_api/task_results/task_abc123"
}
Shutdown Unit
Queues a shutdown on a unit or cluster.
Endpoint
POST /api/units/{pioreactor_unit}/system/shutdown
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name or $broadcast. |
Response
Success
Status: 202 Accepted
{
"unit": "leader",
"task_id": "task_abc123",
"result_url_path": "/unit_api/task_results/task_abc123"
}
Get Clock Time
Returns the UTC clock time from a unit or cluster.
Endpoint
GET /api/units/{pioreactor_unit}/system/utc_clock
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name or $broadcast. |
Response
Success
Status: 202 Accepted
{
"unit": "leader",
"task_id": "task_abc123",
"result_url_path": "/unit_api/task_results/task_abc123"
}
Set Clock Time
Sets leader clock and syncs workers.
Endpoint
POST /api/system/utc_clock
Request
Request Body
{
"utc_clock_time": "2026-01-31T12:45:00Z"
}
Response
Success
Status: 202 Accepted
{
"unit": "leader",
"task_id": "task_abc123",
"result_url_path": "/unit_api/task_results/task_abc123"
}
Get Recent Logs
Returns recent experiment logs across units.
Endpoint
GET /api/experiments/{experiment}/recent_logs
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| min_level | string | No | INFO | Minimum log level filter. |
Response
Success
Status: 200 OK
[
{
"timestamp": "2026-01-31T12:45:00.000Z",
"level": "INFO",
"pioreactor_unit": "pio01",
"message": "Job started",
"task": "stirring",
"experiment": "Exp001"
}
]
Get Logs
Returns paginated logs across all experiments.
Endpoint
GET /api/logs
Request
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| skip | integer | No | 0 | Number of rows to skip. |
| min_level | string | No | INFO | Minimum log level filter. |
Response
Success
Status: 200 OK
[
{
"timestamp": "2026-01-31T12:45:00.000Z",
"level": "INFO",
"pioreactor_unit": "pio01",
"message": "Job started",
"task": "stirring",
"experiment": "Exp001"
}
]
Get Experiment Logs
Returns paginated logs for a single experiment.
Endpoint
GET /api/experiments/{experiment}/logs
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| skip | integer | No | 0 | Number of rows to skip. |
| min_level | string | No | INFO | Minimum log level filter. |
Response
Success
Status: 200 OK
[
{
"timestamp": "2026-01-31T12:45:00.000Z",
"level": "INFO",
"pioreactor_unit": "pio01",
"message": "Job started",
"task": "stirring",
"experiment": "Exp001"
}
]
Get Recent Logs For Unit And Experiment
Returns recent logs for a specific unit within an experiment.
Endpoint
GET /api/workers/{pioreactor_unit}/experiments/{experiment}/recent_logs
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name. |
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| min_level | string | No | INFO | Minimum log level filter. |
Response
Success
Status: 200 OK
[
{
"timestamp": "2026-01-31T12:45:00.000Z",
"level": "INFO",
"pioreactor_unit": "pio01",
"message": "Job started",
"task": "stirring",
"experiment": "Exp001"
}
]
Get Logs For Unit And Experiment
Returns paginated logs for a unit within an experiment.
Endpoint
GET /api/workers/{pioreactor_unit}/experiments/{experiment}/logs
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name. |
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| skip | integer | No | 0 | Number of rows to skip. |
| min_level | string | No | INFO | Minimum log level filter. |
Response
Success
Status: 200 OK
[
{
"timestamp": "2026-01-31T12:45:00.000Z",
"level": "INFO",
"pioreactor_unit": "pio01",
"message": "Job started",
"task": "stirring",
"experiment": "Exp001"
}
]
Get System Logs For Unit
Returns paginated system logs for a unit.
Endpoint
GET /api/units/{pioreactor_unit}/system_logs
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| skip | integer | No | 0 | Number of rows to skip. |
| min_level | string | No | INFO | Minimum log level filter. |
Response
Success
Status: 200 OK
[
{
"timestamp": "2026-01-31T12:45:00.000Z",
"level": "INFO",
"pioreactor_unit": "pio01",
"message": "System started",
"task": "system",
"experiment": "$system"
}
]
Get Logs For Unit
Returns paginated logs for a unit across experiments.
Endpoint
GET /api/units/{pioreactor_unit}/logs
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| skip | integer | No | 0 | Number of rows to skip. |
| min_level | string | No | INFO | Minimum log level filter. |
Response
Success
Status: 200 OK
[
{
"timestamp": "2026-01-31T12:45:00.000Z",
"level": "INFO",
"pioreactor_unit": "pio01",
"message": "Job started",
"task": "stirring",
"experiment": "Exp001"
}
]
Publish New Log
Publishes a log entry via MQTT for a unit or experiment.
Endpoint
POST /api/workers/{pioreactor_unit}/experiments/{experiment}/logs
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name or $broadcast. |
| experiment | string | Yes | Experiment identifier. |
Request Body
{
"message": "Started",
"source": "ui",
"level": "INFO",
"timestamp": "2026-01-31T12:45:00.000Z",
"task": "stirring"
}
Response
Success
Status: 202 Accepted
{
"status": "success"
}
Get Growth Rates
Returns growth-rate time series for all units in an experiment.
Endpoint
GET /api/experiments/{experiment}/time_series/growth_rates
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 0.0123}]]
}
Get Temperature Readings
Returns temperature time series for all units in an experiment.
Endpoint
GET /api/experiments/{experiment}/time_series/temperature_readings
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 37.1}]]
}
Get OD Readings Filtered
Returns filtered OD time series for all units in an experiment.
Endpoint
GET /api/experiments/{experiment}/time_series/od_readings_filtered
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 0.1234567}]]
}
Get OD Readings
Returns OD readings time series for all units in an experiment.
Endpoint
GET /api/experiments/{experiment}/time_series/od_readings
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01-1"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 0.2345678}]]
}
Get OD Readings Fused
Returns fused OD time series for all units in an experiment.
Endpoint
GET /api/experiments/{experiment}/time_series/od_readings_fused
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 0.2234567}]]
}
Get Raw OD Readings
Returns raw OD time series for all units in an experiment.
Endpoint
GET /api/experiments/{experiment}/time_series/raw_od_readings
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01-1"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 1234.5}]]
}
Get Fallback Time Series
Returns time series for any data source and column.
Endpoint
GET /api/experiments/{experiment}/time_series/{data_source}/{column}
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| experiment | string | Yes | Experiment identifier. |
| data_source | string | Yes | Table name to query. |
| column | string | Yes | Column name to query. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 1.23}]]
}
Get Growth Rates Per Unit
Returns growth-rate time series for a single unit.
Endpoint
GET /api/workers/{pioreactor_unit}/experiments/{experiment}/time_series/growth_rates
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name. |
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 0.0123}]]
}
Get Temperature Readings Per Unit
Returns temperature time series for a single unit.
Endpoint
GET /api/workers/{pioreactor_unit}/experiments/{experiment}/time_series/temperature_readings
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name. |
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 37.1}]]
}
Get OD Readings Filtered Per Unit
Returns filtered OD time series for a single unit.
Endpoint
GET /api/workers/{pioreactor_unit}/experiments/{experiment}/time_series/od_readings_filtered
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name. |
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 0.1234567}]]
}
Get OD Readings Per Unit
Returns OD readings time series for a single unit.
Endpoint
GET /api/workers/{pioreactor_unit}/experiments/{experiment}/time_series/od_readings
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name. |
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01-1"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 0.2345678}]]
}
Get OD Readings Fused Per Unit
Returns fused OD time series for a single unit.
Endpoint
GET /api/workers/{pioreactor_unit}/experiments/{experiment}/time_series/od_readings_fused
Request
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pioreactor_unit | string | Yes | Unit name. |
| experiment | string | Yes | Experiment identifier. |
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| lookback | number | No | 4.0 | Hours of history to include. |
| target_points | integer | No | 720 | Target number of points. |
Response
Success
Status: 200 OK
{
"series": ["pio01"],
"data": [[{"x": "2026-01-31T12:00:00.000Z", "y": 0.2234567}]]
}