Site
GET /api/site/
list all sites
POST /api/site/
create a site
GET /api/site/:SITE_ID
view one site
PUT /api/site/:SITE_ID
update one site
DELETE /api/site/:SITE_ID
delete one site
GET request are public, certain config data is excluded publicly. The post, put and delete are all admin only.
Site config
One of the crucial aspects of the Site is it's config option, it is saved in a JSON column. The site configuration for how site should handle voting, ideas, arguments, domains, what Database CMS uses, if Basic Auth is turned and and more.
This is the current default configuration:
{
"config": {
"allowedDomains": {
"type": "arrayOfStrings"
},
"project": {
"type": "object",
"subset": {
"endDate": {
"type": "string"
},
"endDateNotificationSent": {
"type": "boolean"
},
"projectHasEnded": {
"type": "boolean"
}
}
},
"anonymize": {
"type": "object",
"subset": {
"anonymizeUsersXDaysAfterEndDate": {
"type": "int"
},
"warnUsersAfterXDaysOfInactivity": {
"type": "int"
},
"anonymizeUsersAfterXDaysOfInactivity": {
"type": "int"
},
"inactiveWarningEmail": {
"type": "object",
"subset": {
"subject": {
"type": "string"
},
"template": {
"type": "string"
}
}
}
}
},
"basicAuth": {
"type": "object",
"subset": {
"active": {
"type": "boolean"
},
"user": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"cms": {
"type": "object",
"subset": {
"dbName": {
"type": "string"
},
"url": {
"type": "string"
},
"hostname": {
"type": "string"
},
"after-login-redirect-uri": {
"type": "string"
},
"redirectURI": {
"type": "string"
},
"widgetDisplaySettings": {
"type": "object",
"subset": {
"beta": {
"type": "boolean"
},
"deprecated": {
"type": "boolean"
},
"visibleWidgets": {
"type": "arrayOfStrings"
}
}
}
}
},
"notifications": {
"type": "object",
"subset": {
"fromAddress": {
"type": "string"
},
"projectmanagerAddress": {
"type": "string"
},
"siteadminAddress": {
"type": "string"
}
}
},
"email": {
"type": "object",
"subset": {
"siteaddress": {
"type": "string"
},
"thankyoumail": {
"type": "object",
"subset": {
"from": {
"type": "string"
}
}
}
}
},
"oauth": {
"type": "objectsInObject",
"subset": {
"auth-server-url": {
"type": "string"
},
"auth-client-id": {
"type": "string"
},
"auth-client-secret": {
"type": "string"
},
"auth-server-login-path": {
"type": "string"
},
"auth-server-exchange-code-path": {
"type": "string"
},
"auth-server-get-user-path": {
"type": "string"
},
"auth-server-logout-path": {
"type": "string"
},
"after-login-redirect-uri": {
"type": "string"
}
}
},
"ideas": {
"type": "object",
"subset": {
"canAddNewIdeas": {
"type": "boolean"
},
"titleMinLength": {
"type": "int"
},
"titleMaxLength": {
"type": "int"
},
"summaryMinLength": {
"type": "int"
},
"summaryMaxLength": {
"type": "int"
},
"descriptionMinLength": {
"type": "int"
},
"descriptionMaxLength": {
"type": "int"
},
"minimumYesVotes": {
"type": "int"
},
"showVoteButtons": {
"type": "boolean"
},
"canEditAfterFirstLikeOrArg": {
"type": "boolean"
},
"feedbackEmail": {
"from": {
"type": "string"
},
"subject": {
"type": "string"
},
"inzendingPath": {
"type": "string"
},
"template": {
"type": "string"
}
},
"extraDataMustBeDefined": {
"type": "boolean"
},
"extraData": {
"type": "object"
},
"types": {
"type": "arrayOfObjects",
"subset": {
"name": {
"type": "string"
},
"label": {
"type": "label"
},
"auth": {
"type": "object"
},
"mapIcon": {
"type": "string"
},
"listIcon": {
"type": "string"
},
"buttonIcon": {
"type": "string"
},
"buttonLabel": {
"type": "string"
},
"backgroundColor": {
"type": "string"
},
"textColor": {
"type": "string"
},
"flag": {
"type": "string"
},
"mapUploadedFlag": {
"type": "string"
},
"mapFlagWidth": {
"type": "string"
},
"mapFlagHeight": {
"type": "string"
},
"Initialavailablebudget": {
"type": "int"
},
"minimalBudgetSpent": {
"type": "int"
}
}
},
"automaticallyUpdateStatus": {
"isActive": {
"type": "boolean"
},
"afterXDays": {
"type": "int"
}
}
}
},
"arguments": {
"type": "object",
"subset": {
"new": {
"type": "object",
"subset": {
"anonymous": {
"type": "object",
"subset": {
"redirect": {
"type": "string"
},
"notAllowedMessage": {
"type": "string"
}
}
},
"showFields": {
"type": "arrayOfStrings"
}
}
},
"isClosed": {
"type": "boolean"
},
"closedText": {
"type": "string"
}
}
},
"users": {
"type": "object",
"subset": {
"extraDataMustBeDefined": {
"type": "boolean"
},
"extraData": {
"type": "object"
},
"canCreateNewUsers": {
"type": "boolean"
},
"allowUseOfNicknames": {
"type": "boolean"
}
}
},
"votes": {
"type": "object",
"subset": {
"isViewable": {
"type": "boolean"
},
"isActive": {
"type": "boolean"
},
"isActiveFrom": {
"type": "string"
},
"isActiveTo": {
"type": "string"
},
"requiredUserRole": {
"type": "string"
},
"mustConfirm": {
"type": "boolean"
},
"withExisting": {
"type": "enum",
"values": [
"error",
"replace",
"merge"
]
},
"voteType": {
"type": "enum",
"values": [
"likes",
"count",
"budgeting",
"count-per-theme",
"budgeting-per-theme"
]
},
"voteValues": {
"type": "enum",
"values": [
{
"label": "voor",
"value": "yes"
},
{
"label": "tegen",
"value": "no"
}
]
},
"maxIdeas": {
"type": "int"
},
"minIdeas": {
"type": "int"
},
"minBudget": {
"type": "int"
},
"maxBudget": {
"type": "int"
},
"themes": {
"type": "objectList",
"elementSubset": {
"minBudget": {
"type": "int"
},
"maxBudget": {
"type": "int"
}
}
}
}
},
"articles": {
"type": "object",
"subset": {
"canAddNewArticles": {
"type": "boolean"
},
"titleMinLength": {
"type": "int"
},
"titleMaxLength": {
"type": "int"
},
"summaryMinLength": {
"type": "int"
},
"summaryMaxLength": {
"type": "int"
},
"descriptionMinLength": {
"type": "int"
},
"descriptionMaxLength": {
"type": "int"
},
"minimumYesVotes": {
"type": "int"
},
"canEditAfterFirstLikeOrArg": {
"type": "boolean"
},
"feedbackEmail": {
"from": {
"type": "string"
},
"subject": {
"type": "string"
},
"inzendingPath": {
"type": "string"
},
"template": {
"type": "string"
}
},
"extraDataMustBeDefined": {
"type": "boolean"
},
"extraData": {
"type": "object"
}
}
},
"polls": {
"type": "object",
"subset": {
"canAddPolls": {
"type": "boolean"
},
"requiredUserRole": {
"type": "string"
}
}
},
"newslettersignup": {
"type": "object",
"subset": {
"isActive": {
"type": "boolean"
},
"autoConfirm": {
"type": "boolean"
},
"confirmationEmail": {
"type": "object",
"subset": {
"from": {
"type": "string"
},
"subject": {
"type": "string"
},
"url": {
"type": "string"
},
"template": {
"type": "string"
}
}
}
}
},
"host": {
"status": null
},
"ignoreBruteForce": {
"type": "arrayOfStrings"
}
}
}
Last updated