FirstSpirit REST API, 0.0.16
Documentation
FirstSpirit REST API: Installation & Configuration
The FirstSpirit REST Service is a web application providing a REST interface. The module is currently is in active development, giving access to several core functionalities.
FirstSpirit would appreciate your feedback on the existing endpoints and returned JSON data.
Given the alpha status of the module, consider the following:
- In its current state the module should only be used for testing and development purposes.
- Do not use the module on a production server.
- The alpha release version has not undergone security testing. Do not expose to public networks.
Installation
To install the module:
- Download the latest version from Artifactory.
- Place a file called
fs-rest-service.propertiesin thelibdirectory of Tomcat.
The file
fs-rest-service.properties requires further configuration as described here.
Configuration
The file fs-rest-service.properties requires the following minimal configuration:
fs.rest.host=localhost
fs.rest.port=1088
fs.rest.mode=SOCKET
Update the host name and port to match your local setup. The mode property accepts either SOCKET or HTTP.
If the REST service is running as part of a web application, you may also need to configure CORS origins:
fs.rest.cors.allowedOriginPatterns=http://localhost:*
To enable rate limiting, add the following properties to fs-rest-service.properties:
fs.rest.rateLimit.enabled=true
fs.rest.rateLimit.requestsPerWindow=300
fs.rest.rateLimit.windowSeconds=60
fs.rest.rateLimit.warnThreshold=0.8