Add an API prefix

This MR makes use of an upcoming LabThings feature to put the Thing URLs behind an API prefix, so that (for example) the camera would move from http://microscope.local:5000/camera to http://microscope.local:5000/api/v3/camera.

I've tested the web app manually with the simulator, and verified I could scan and stitch. I'm pleasantly surprised I've not yet found a URL that is broken, as I only changed one function! I guess even the manual URLs would have respected the origin so perhaps it really is this simple.

This MR contains the following

  • Add an API prefix to the three config files
  • Update the lifecycle test to use the new URLs
  • Update the web app's getOriginFromLocation function so the default origin URL is correct

Before merge:

  • Wait for LabThings!268 to be merged and released
  • Update LabThings dependency
  • Rebase this MR so the LabThings dependency is a release again

Merge checklist:

  • All new/changed functions have up to date typehints and docstrings
  • [ ] Any UI updates have a before and after screenshot in the MR description
  • Unit testing of new functionality has similar or better coverage than similar existing code
  • This code has been tested on a microscope
    • Webapp has been recompiled, with aesthetic changes checked in light and dark mode (if changed)
    • [ ] With updated settings JSON (if changed)
    • SmartScan and live stitching work

Merge request reports

Loading