Web app for visualizing pathogen evolution

Requests Made from the Client

The Auspice client will make a number of requests to various endpoints, which this document aims to provide an overview of. Some of these are dependent on the build-time customisations in use, and we plan to allow more flexibility here using this mechanism.

Requests to the Auspice Server

For the purposes of this section we are assuming you are running locally on "localhost:4000", however the idea is the same if Auspice is deployed to a server.

Auspice Client JavaScript Code

The (bundled) client code (which is generated by auspice build) is broken up into a number of "chunks" which are delivered to the client as needed. These originate from the following block in the index.html file: html <script async src="/dist/auspice.bundle.js"></script>

"Charon" GET requests

When a dataset, narrative, or listing of available datasets is to be displayed in Auspice, a selection of the following requests are made to localhost:4000.

  • /charon/getAvailable -- return a list of available datasets and narratives
  • /charon/getDataset -- return the requested dataset
  • /charon/getNarrative -- return the requested narrative

See the server API documentation for more details about the requests, or the client customisation API for the ability to change "/charon" to a different value.

Image Requests

The initial Auspice page (i.e. the one which displays a listing of available datasets) requests some images for the footer.

External Requests

Fonts

Two initial requests for fonts are made, for Google-hosted Lato fonts (CSS) and font-awesome (CSS). These in turn make a number of subsequent requests for the individual font files etc.

Leaflet

We use Leaflet to display the map tiles. There is one initial CSS request which is always made, regardless of whether a map is displayed.

If a map is displayed by Auspice the individual tiles are requested from api.mapbox.com. Panning and zooming of the map result in futher requests for tiles. These are requested using our hardcoded access key, however this may change to a build-time-customisation in the future.

Google Analytics (Optional)

Auspice has the potential to include Google Analytics in a limited fashion. See the client customisation API documentation for how to set this. Note that these requests are only made if you specify a Google Analytics key during build-time customisation of the client.