OpenFolia

Change the installation settings

PATCH
/settings

What is left out stays. Applies at once. A changed selfApproval is audited as settings.self-approval (from, to); approvals already given stay, whatever it changes to (the rule is read when an approval is given). A change that changes nothing records nothing. Needs the admin.roles permission.

Authorization

bearer
headerAuthorizationBearer <JWT>

A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.

Header Parameters

X-Ccms-User?string

Demo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).

Request Body

application/vnd.api+json
  1. body
data*

Response Body

application/vnd.api+json
  1. response
data*

The installation’s own settings, changed at once (not in a change set). id is always installation.

Example Request
curl -X PATCH 'http://localhost:3000/settings' \  -H 'Content-Type: application/vnd.api+json' \  -d '{  "data": {    "type": "InstallationSettings",    "attributes": {}  }}'
Example Response
{  "data": {    "type": "InstallationSettings",    "id": "string",    "attributes": {      "selfApproval": "never",      "updatedAt": "2019-08-24T14:15:22Z"    }  }}