Skip to content

Commit cf3e35d

Browse files
new docs for update
1 parent 4593d0a commit cf3e35d

File tree

17 files changed

+257
-85
lines changed

17 files changed

+257
-85
lines changed

developer-guide/09-Storage and the filesystem/01-data-stores/local_storage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ Here's an example:
1111
from pioreactor.utils import local_intermittent_storage, local_peristant_storage
1212

1313

14-
with local_intermittent_storage("my_cache") as cache:
14+
with local_intermittent_storage("my_namespace2") as cache:
1515
cache['key'] = "value"
1616
print(cache['key'])
1717

1818

19-
with local_peristant_storage("my_longterm_storage") as cache:
19+
with local_peristant_storage("my_namespace1") as cache:
2020
cache['key'] = "value"
2121

2222

2323
```
2424

2525
You can use `pio view-cache <name>` to view the contents of `<name>`, and `pio clear-cache <name> <key>` to clear contents.
2626

27-
### What's the difference between `local_intermittent_storage` and `local_peristant_storage`?
27+
### What's the difference between `local_intermittent_storage` and `local_peristent_storage`?
2828

2929
`local_intermittent_storage` is data that won't, or shouldn't, exist after a reboot. For example: the state of GPIO pins. At a hardware level, this is reset after each reboot, and so should data associated with it.
3030

developer-guide/09-Storage and the filesystem/02-filesystem.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Below is a list of important locations and files on the filesystem for the Piore
1212
- `/var/www/pioreactorui/` is the source of the web-app.
1313
- `/var/www/pioreactorui/.env` holds some configuration for the UI.
1414
- `/var/www/pioreactorui/contrib/` holds yaml files that display automation data, job data, and chart data.
15-
- `/home/pioreactor/.pioreactor/plugins/ui/contrib/` also holds yaml files, like the above.
15+
- Note: `/home/pioreactor/.pioreactor/plugins/ui/contrib/` also holds yaml files, like the above.
1616

1717

1818
### Logs
@@ -24,7 +24,7 @@ Below is a list of important locations and files on the filesystem for the Piore
2424
### Storage
2525

2626
- `/home/pioreactor/.pioreactor/storage/` holds the main database, backup of the database, and persistent caches.
27-
- `/tmp/` holds temporary caches. Files in here are not kept between reboots.
27+
- `/tmp/pioreactor_cache/` holds temporary caches. Files in here are not kept between reboots.
2828

2929

3030
### Bash scripts
@@ -45,3 +45,7 @@ Below is a list of important locations and files on the filesystem for the Piore
4545

4646
- `/home/pioreactor/.pioreactor/experiment_profiles/` is where experiment profiles (yaml) are stored.
4747

48+
### Calibrations
49+
50+
- `/home/pioreactor/.pioreactor/storage/calibrations/` is where calibrations are stored.
51+

developer-guide/20-User interface/02-api.md

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ slug: /web-ui-api
55

66
### All endpoints
77

8+
In most cases, where you see `<pioreactor_unit>`, you can use the key `$broadcast` to send the command to all units.
9+
810
```
911
Endpoint Methods Rule
1012
----------------------------------------------------- ----------- ----------------------------------------------------------------------------------
11-
api.create_or_update_new_calibrations PUT /api/calibrations
12-
api.get_available_calibrations_type_by_unit GET /api/calibrations/<pioreactor_unit>
13-
api.get_available_calibrations_of_type GET /api/calibrations/<pioreactor_unit>/<calibration_type>
14-
api.get_calibration_by_name GET /api/calibrations/<pioreactor_unit>/<calibration_type>/<calibration_name>
15-
api.patch_calibrations PATCH /api/calibrations/<pioreactor_unit>/<calibration_type>/<calibration_name>
16-
api.get_current_calibrations_of_type GET /api/calibrations/<pioreactor_unit>/<calibration_type>/current
1713
api.get_configs GET /api/configs
1814
api.get_config GET /api/configs/<filename>
1915
api.update_config PATCH /api/configs/<filename>
@@ -25,14 +21,21 @@ api.update_experiment_profile PATCH /api/contrib
2521
api.get_experiment_profiles GET /api/contrib/experiment_profiles
2622
api.get_experiment_profile GET /api/contrib/experiment_profiles/<filename>
2723
api.delete_experiment_profile DELETE /api/contrib/experiment_profiles/<filename>
24+
api.get_exportable_datasets GET /api/contrib/exportable_datasets
25+
api.preview_exportable_datasets GET /api/contrib/exportable_datasets/<target_dataset>/preview
2826
api.get_job_contrib GET /api/contrib/jobs
2927
api.get_experiments GET /api/experiments
3028
api.create_experiment POST /api/experiments
3129
api.delete_experiment DELETE /api/experiments/<experiment>
3230
api.update_experiment PATCH /api/experiments/<experiment>
3331
api.get_experiment GET /api/experiments/<experiment>
34-
api.get_logs GET /api/experiments/<experiment>/logs
32+
api.get_list_of_historical_workers_for_experiment GET /api/experiments/<experiment>/historical_worker_assignments
33+
api.get_jobs_running_across_cluster_in_experiment GET /api/experiments/<experiment>/jobs/running
34+
api.get_settings_for_job_across_cluster_in_experiment GET /api/experiments/<experiment>/jobs/settings/job_name/<job_name>
35+
api.get_setting_for_job_across_cluster_in_experiment GET /api/experiments/<experiment>/jobs/settings/job_name/<job_name>/setting/<setting>
36+
api.get_exp_logs GET /api/experiments/<experiment>/logs
3537
api.get_media_rates GET /api/experiments/<experiment>/media_rates
38+
api.get_recent_logs GET /api/experiments/<experiment>/recent_logs
3639
api.get_fallback_time_series GET /api/experiments/<experiment>/time_series/<data_source>/<column>
3740
api.get_growth_rates GET /api/experiments/<experiment>/time_series/growth_rates
3841
api.get_od_readings GET /api/experiments/<experiment>/time_series/od_readings
@@ -50,47 +53,63 @@ api.export_datasets POST /api/export_
5053
api.get_historical_media_used GET /api/historical_media
5154
api.get_historical_organisms_used GET /api/historical_organisms
5255
api.is_local_access_point_active GET /api/is_local_access_point_active
53-
api.get_jobs_running_across_cluster GET /api/jobs/running
54-
api.get_jobs_running_across_cluster_in_experiment GET /api/jobs/running/experiments/<experiment>
55-
api.get_settings_for_job_across_cluster_in_experiment GET /api/jobs/settings/job_name/<job_name>/experiments/<experiment>
56-
api.get_setting_for_job_across_cluster_in_experiment GET /api/jobs/settings/job_name/<job_name>/experiments/<experiment>/setting/<setting>
57-
api.get_setting_for_job_across_cluster GET /api/jobs/settings/job_name/<job_name>/setting/<setting>
58-
api.get_job_settings_for_worker GET /api/jobs/settings/workers/<pioreactor_unit>/job_name/<job_name>
59-
api.get_job_setting_for_worker GET /api/jobs/settings/workers/<pioreactor_unit>/job_name/<job_name>/setting/<setting>
60-
api.install_plugin_across_cluster PATCH, POST /api/plugins/install
61-
api.get_plugins_across_cluster GET /api/plugins/installed
62-
api.uninstall_plugin_across_cluster PATCH, POST /api/plugins/uninstall
56+
api.get_logs GET /api/logs
6357
api.update_app_from_release_archive POST /api/system/update_from_archive
6458
api.update_app POST /api/system/update_next_version
6559
api.upload POST /api/system/upload
60+
api.set_clocktime POST /api/system/utc_clock
61+
api.get_list_of_units GET /api/units
6662
api.run_job_on_unit_in_experiment PATCH, POST /api/units/<pioreactor_unit>/jobs/run/job_name/<job>/experiments/<experiment>
6763
api.get_running_jobs_on_unit GET /api/units/<pioreactor_unit>/jobs/running
64+
api.get_jobs_running GET /api/units/<pioreactor_unit>/jobs/running
6865
api.stop_job_on_unit PATCH, POST /api/units/<pioreactor_unit>/jobs/stop/job_name/<job>/experiments/<experiment>
6966
api.update_job_on_unit PATCH /api/units/<pioreactor_unit>/jobs/update/job_name/<job>/experiments/<experiment>
67+
api.get_logs_for_unit GET /api/units/<pioreactor_unit>/logs
68+
api.install_plugin_across_cluster PATCH, POST /api/units/<pioreactor_unit>/plugins/install
69+
api.get_plugins_on_machine GET /api/units/<pioreactor_unit>/plugins/installed
70+
api.uninstall_plugin_across_cluster PATCH, POST /api/units/<pioreactor_unit>/plugins/uninstall
7071
api.reboot_unit POST /api/units/<pioreactor_unit>/system/reboot
7172
api.shutdown_unit POST /api/units/<pioreactor_unit>/system/shutdown
72-
api.get_app_versions_across_cluster GET /api/versions/app
73-
api.get_ui_versions_across_cluster GET /api/versions/ui
73+
api.get_clocktime GET /api/units/<pioreactor_unit>/system/utc_clock
74+
api.get_app_versions GET /api/units/<pioreactor_unit>/versions/app
75+
api.get_ui_versions_across_cluster GET /api/units/<pioreactor_unit>/versions/ui
7476
api.get_list_of_workers GET /api/workers
7577
api.add_worker PUT /api/workers
7678
api.delete_worker DELETE /api/workers/<pioreactor_unit>
7779
api.get_worker GET /api/workers/<pioreactor_unit>
80+
api.get_all_active_calibrations GET /api/workers/<pioreactor_unit>/active_calibrations
81+
api.remove_active_status_calibration DELETE /api/workers/<pioreactor_unit>/active_calibrations/<device>
82+
api.set_active_calibration PATCH /api/workers/<pioreactor_unit>/active_calibrations/<device>/<cal_name>
7883
api.blink_worker POST /api/workers/<pioreactor_unit>/blink
84+
api.get_all_calibrations GET /api/workers/<pioreactor_unit>/calibrations
85+
api.get_calibrations GET /api/workers/<pioreactor_unit>/calibrations/<device>
86+
api.get_calibration GET /api/workers/<pioreactor_unit>/calibrations/<device>/<cal_name>
87+
api.remove_calibration DELETE /api/workers/<pioreactor_unit>/calibrations/<device>/<cal_name>
7988
api.get_experiment_assignment_for_worker GET /api/workers/<pioreactor_unit>/experiment
8089
api.get_logs_for_unit_and_experiment GET /api/workers/<pioreactor_unit>/experiments/<experiment>/logs
90+
api.publish_new_log POST /api/workers/<pioreactor_unit>/experiments/<experiment>/logs
91+
api.get_recent_logs_for_unit_and_experiment GET /api/workers/<pioreactor_unit>/experiments/<experiment>/recent_logs
8192
api.change_worker_status PUT /api/workers/<pioreactor_unit>/is_active
8293
api.run_job_on_unit_in_experiment PATCH, POST /api/workers/<pioreactor_unit>/jobs/run/job_name/<job>/experiments/<experiment>
8394
api.get_running_jobs_on_unit GET /api/workers/<pioreactor_unit>/jobs/running
95+
api.get_job_settings_for_worker GET /api/workers/<pioreactor_unit>/jobs/settings/job_name/<job_name>
96+
api.get_job_setting_for_worker GET /api/workers/<pioreactor_unit>/jobs/settings/job_name/<job_name>/setting/<setting>
8497
api.stop_all_jobs_on_worker_for_experiment PATCH, POST /api/workers/<pioreactor_unit>/jobs/stop/experiments/<experiment>
8598
api.stop_job_on_unit PATCH, POST /api/workers/<pioreactor_unit>/jobs/stop/job_name/<job>/experiments/<experiment>
8699
api.update_job_on_unit PATCH /api/workers/<pioreactor_unit>/jobs/update/job_name/<job>/experiments/<experiment>
100+
api.get_all_calibrations_as_yamls GET /api/workers/<pioreactor_unit>/zipped_calibrations
87101
api.get_workers_and_experiment_assignments GET /api/workers/assignments
88102
api.remove_all_workers_from_all_experiments DELETE /api/workers/assignments
89103
api.stop_all_jobs_in_experiment PATCH, POST /api/workers/jobs/stop/experiments/<experiment>
90104
api.setup_worker_pioreactor POST /api/workers/setup
91-
api.reboot_units POST /api/workers/system/reboot
92-
api.shutdown_units POST /api/workers/system/shutdown
93105
static GET /static/<path:filename>
106+
unit_api.get_all_active_calibrations GET /unit_api/active_calibrations
107+
unit_api.remove_active_status_calibration DELETE /unit_api/active_calibrations/<device>
108+
unit_api.set_active_calibration PATCH /unit_api/active_calibrations/<device>/<cal_name>
109+
unit_api.get_all_calibrations GET /unit_api/calibrations
110+
unit_api.get_calibrations_by_device GET /unit_api/calibrations/<device>
111+
unit_api.get_calibration GET /unit_api/calibrations/<device>/<cal_name>
112+
unit_api.remove_calibration DELETE /unit_api/calibrations/<device>/<cal_name>
94113
unit_api.run_job PATCH, POST /unit_api/jobs/run/job_name/<job>
95114
unit_api.get_all_running_jobs GET /unit_api/jobs/running
96115
unit_api.get_running_jobs_for_experiment GET /unit_api/jobs/running/experiments/<experiment>
@@ -101,18 +120,24 @@ unit_api.stop_all_jobs PATCH, POST /unit_api/jo
101120
unit_api.stop_all_jobs_by_experiment PATCH, POST /unit_api/jobs/stop/experiment/<experiment>
102121
unit_api.stop_job_by_name PATCH, POST /unit_api/jobs/stop/job_name/<job_name>
103122
unit_api.stop_all_jobs_by_source PATCH, POST /unit_api/jobs/stop/job_source/<job_source>
123+
unit_api.get_all_long_running_jobs GET /unit_api/long_running_jobs/running
104124
unit_api.install_plugin PATCH, POST /unit_api/plugins/install
105125
unit_api.get_installed_plugins GET /unit_api/plugins/installed
106126
unit_api.get_plugin GET /unit_api/plugins/installed/<filename>
107127
unit_api.uninstall_plugin PATCH, POST /unit_api/plugins/uninstall
128+
unit_api.dir_listing GET /unit_api/system/path/
129+
unit_api.dir_listing GET /unit_api/system/path/<path:req_path>
108130
unit_api.reboot PATCH, POST /unit_api/system/reboot
109131
unit_api.remove_file PATCH, POST /unit_api/system/remove_file
110132
unit_api.shutdown PATCH, POST /unit_api/system/shutdown
111133
unit_api.update_app_and_ui PATCH, POST /unit_api/system/update
112134
unit_api.update_target PATCH, POST /unit_api/system/update/<target>
135+
unit_api.get_clock_time GET /unit_api/system/utc_clock
136+
unit_api.set_clock_time PATCH, POST /unit_api/system/utc_clock
113137
unit_api.task_status GET /unit_api/task_results/<task_id>
114138
unit_api.get_app_version GET /unit_api/versions/app
115139
unit_api.get_ui_version GET /unit_api/versions/ui
140+
unit_api.get_all_calibrations_as_yaml GET /unit_api/zipped_calibrations
116141
```
117142

118143
From `python3 -m flask --debug --app main routes -s rule`

0 commit comments

Comments
 (0)