caMicroscope API Guide

caMicroscope is a web-based whole slide pathology image and data viewer, with a strong emphasis on cancer pathology WSI (Whole Slide Imaging). This guide is designed for developers looking to understand or use caMicroscope APIs. Note that this does not (yet) cover pathdb

Using the APIs

caMicroscope's security settings primarily restrict access to APIs. In instances where security is turned on, a JWT should be included with the request as a cookie, url param, or Bearer authroization header. If permissions are set up, the JWT should be issued with a SUB of a user that has sufficient access.

APIs work almost exclusively in JSON, with the exception of the tile service.

Data APIs

Data apis are configured in routes.json and follow the pattern: /data/*collection*/*action*. Common actions include create, update, post, find and delete.

The following are the collections present in the default routes.json configuration:

  • Slide - slite metadata
  • Request - action request for admins
  • Mark - Annotation with a spatial component
  • Presetlabels - Configuration option for the preset label tool
  • Template - template for the annotation user form
  • Heatmap - Sparse matrix spatial grid data (computer generated)
  • HeatmapEdit - Heatmaps made/edited by humans.
  • Log - Better than good
  • Freeform - Cookies that live on the server

There also exist some special handlers for things like spatial queries and optimizations for common queries.

The Tile Service

The IIP tile service uses either deepzoom urls (/img/IIP/raw/?DeepZoom=*file_location*_files/z/x_y.jpg) or IIIF urls (/img/IIP/raw/?IIIF=*file_location*/25355,13384,1024,1024/24,/0/default.jpg). IIIF urls are generally easier to use for special development.