Please create a new issue if you encounter any bugs.
This is the server for DiSARM. Users will require access to a configured and deployed client application.
git clone https://gitlab.com/disarm/douma.api douma-api
)The client application is served over HTTPS, so any requests made (e.g. to this API) must also be served from a domain using HTTPS. For core instance servers, DiSARM can make a proxy server available.
The domain name needs to be provided to the client application.
It's possible to automatically configure it via a URL parameter, something like https://zwe-mats.api.disarm.io#api_url=https://zwe.api.disarm.io
.
This assumes the API server is available through https://zwe.api.disarm.io
Go to douma-api directory and install node packages:
npm install
Set SECRET
environment variable to any string. It will be used for user API keys generation.
Set MONGODB_URI
environment variable to URI of your mongodb installation.
For local installation that could be:
mongodb://localhost/douma
Set SHEETS_URL
environment variable to URI of your users CSV file if you store it remotely.
Alternatively use SHEETS_PATH
environment variable to point to CSV file in your local filesystem.
npm run start
You will need to create users.csv
file with all your users. Make sure to set either SHEETS_URL or SHEETS_PATH environment variable.
Make a call to the /v4/refresh_users
route. You should get a success message back.
The following are required:
id
{String} can be anything (e.g. same as username), but must be unique name
{String} - used for displaypassword
{String} - no minimum requirementsusername
{String} - should be unique, can be the same as _id
read
- {String} - comma-separated list of applets the user has read permissions for (see below for list) write
{String} - comma-separated list of applets the user has write permissions for (see below for list)instance_slug
- {String} - provided by maintainers of DOUMA app irs_monitor
(dashboard)irs_plan
(planning tool)irs_tasker
(tasking and team assignment)irs_record_point
(data collection)debug
(debugging features)Please ensure sound practices are in place for backing up data.
Need the same configuration as for production (see above).
Install rerun
Gem, using gem install rerun
, or pick another way to reload server.
Need to
openPaths
arrayaddPermissions
call, with a wildcard permission: e.g. addPermission('get', v(''), ['*'])