main/config/modules.json

61 lines
1.7 KiB
JSON
Executable File

{
"RESTexample": {
"POST article": {
"description": "Posts a new article",
"permissions": [["journalist"]],
"parameters": {
"title": { "description": "Article's title", "type": "varchar(5,100)" },
"content": { "description": "Article's content", "type": "text" }
},
"output": {
"created_id": { "description": "Id of the created article", "type": "id" }
}
},
"GET article": {
"description": "Gets all or a specific article",
"permissions": [["viewer"], ["journalist"]],
"parameters": {
"URL_0": { "description": "Article id", "type": "id", "optional": true }
},
"output": {
"articles": { "description": "List of selected articles", "type": "array<mixed>" }
}
},
"VIEW article": {
"description": "Gets a specific article into a json file (download)",
"permissions": [["viewer"], ["journalist"]],
"options": { "download": true },
"parameters": {
"URL_0": { "description": "Article id", "type": "id" }
},
"output": {
"article": { "description": "Selected article as JSON file", "type": "text" }
}
},
"PUT article": {
"description": "Updates a specific article",
"permissions": [["journalist"]],
"parameters": {
"URL_0": { "description": "Article id", "type": "id" },
"content": { "description": "Article's content", "type": "text" }
},
"output": {
"article": { "description": "Returns updated article", "type": "array<mixed>" }
}
},
"DELETE article": {
"description": "Deletes a specific article",
"permissions": [["journalist"]],
"parameters": {
"URL_0": { "description": "Article id", "type": "id" }
},
"output": {}
}
}
}