Idea
GET /api/site/:SITE_ID/idea/
list all ideasPOST /api/site/:SITE_ID/idea/
create an ideaGET /api/site/:SITE_ID/idea/:IDEA_ID
view one ideaPUT /api/site/:SITE_ID/idea/:IDEA_ID
update one ideaDELETE /api/site/:SITE_ID/idea/:IDEA_ID
delete one ideaGET request are public, POST are only accessible to owners or moderators.
To include more data there are a few get parameters available:
selectRunning
includeArguments
includePosterImage
includeUser
includeVoteCount
includeUserVote
Ideas contain an extraData field for dynamic data that changes per site. The allowed values are configurable per site (it's own rest object)
Supported field types:
boolean
int
string
arrayOfStrings
enum
object
Object is a special case; it requires a subset of definitions (see example). These will be checked recursively.
Removing fields is done by sending them with value
null
.In old versions ist wasn't required to define the extraData values in the site configuration, therefore by default the check is not made at the moment. However extraDataMustBeDefined: true forces the validation, and will soon be the default.
"config": {
"ideas": {
"extraData": {
"zomaar": {
"type": "object",
"subset": {
"zomaar sub1": {
"type": "string",
"allowNull": true
},
"zomaar sub2": {
"type": "boolean",
"allowNull": true
}
},
"allowNull": false
},
"images": {
"type": "arrayOfStrings",
"allowNull": true
},
"gebied": {
"type": "enum",
"values": [
"Oud-West",
"Bos en Lommer",
"De Baarsjes",
"Westerpark",
"West Algemeen"
],
"allowNull": false,
}
}
}
}
Example data:
"extraData": {
"zomaar": {
"zomaar sub1": "Boe",
"zomaar sub2": true
},
"gebied": "De Baarsjes",
"images": [
"https://image-server.staging.openstadsdeel.nl/image/kleine-wereld-6428.jpg"
]
}
Last modified 1yr ago