Pass a trueish value in opts.files to get the list of
raw and final files associated with a sequence. It does
make the query about 30% slower as it stands.
An alert is sent whenever an endpoint returns
an error other than an explicit failure (e.g.,
it won't send an alert if a middleware intentionally
returns a {status: XXX} object).
The configuration file etc/config.yaml is exposed to the
server backend under require('configuration').global.
Note that at some point it will probably make sense to
merge the two config files.
The endpoint /project/:project/configuration/:path(*)?
returns the contents of the survey configuration YAML
file for a given project.
To retrieve the full configuration:
* /project/:project/configuration
To retrieve a specific subset (e.g., binning parameters):
* /project/:project/configuration/binning
To retrieve a specific value (e.g., inline bin width):
* /project/:project/configuration/binning/I_width
Labels can be associated with events and can have
display properties such as a description and colour,
this is why we need an endpoint for the client to
retrieve them.
Events may be filtered by sequence(s):
…/event?sequence=1
…/event?sequence=1;3;7
Events may be filtered by date:
…/event?date0=1970-01-01
Events may be filtered by a date interval:
…/event?date0=1970-01-01&date1=1980-01-01
Events may also be paginated.
If the configuration file is not found, either at its
default place ($HOME/etc/www/config.json) or wherever
indicated by the DOUGAL_API_CONFIG environment variable,
create a temporary default config and try to run with it.
On the other hand, if we are in production (NODE_ENV == production)
we exit with non-zero in the absence of a real configuration file.