Service configuration

Services are configured using a JSON file called services.json. This file contains a list of objects, each one being a service configuration object. There are a set of shared properties on each configuration object as listed below:

  • name: the name of the service, used for display and referencing purposes. Should be unique for each service.
  • basePath: the service handles all requests with paths beginning with this base path. E.g. for base path '/abc' the service would handle any path beginning '/abc' including '/abc' itself. A base path ending in a dot e.g. '/xyz.' means the service will only handle requests to that exact path i.e. it will handle '/xyz' but not '/xyz/pqr'.
  • serviceName: the name of the code package for the microservice, e.g. jsonService, pipeline
  • adapterName: some services present a standard REST API to functions which can be implemented in different ways, e.g. data storage could be done on the local filesystem or AWS S3. In this case the adapterName is the name of the code package which is an adapter for a specific implementation e.g. localFilesystemAdapter.
  • adapter: where a service has an adapter specified, this property can contain an object containing configuration details specific to the adapter.
  • readRoles, writeRoles, createRoles: a space-separated list of roles which are able to access this service in the specified mode. Note that POST requests use the readRoles list. The value 'all' means that any user can access the service in this mode. By convention, the role 'none' means that no user can access the service in this mode. You can also specify different authentication patterns for subpaths of the path space controlled by a service. See Authentication and authorisation.
  • defaultResource: when you are making a request for a directory (a url ending in '/') and you do not have E role (Editor), if this property is set, your request will be forwarded to this resource in the directory you selected. This reflects the common web convention that index.html is served when you request the directory which contains it. So typically this would be set to "index.html" or "index.json" or similar.

Specific services may add to this list.