95 lines
2.2 KiB
JSON
95 lines
2.2 KiB
JSON
|
{
|
||
|
|
||
|
"article": {
|
||
|
|
||
|
"POST": {
|
||
|
"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": {
|
||
|
"description": "Gets all or a specific article",
|
||
|
"permissions": ["viewer", "journalist"],
|
||
|
"parameters": {
|
||
|
"URL0": { "description": "Article id", "type": "id", "optional": true, "rename": "id_article" }
|
||
|
},
|
||
|
"output": {
|
||
|
"articles": { "description": "List of selected articles", "type": "array<mixed>" }
|
||
|
}
|
||
|
},
|
||
|
|
||
|
"VIEW": {
|
||
|
"description": "Gets a specific article into a json file (download)",
|
||
|
"permissions": ["viewer", "journalist"],
|
||
|
"options": { "download": true },
|
||
|
"parameters": {
|
||
|
"URL0": { "description": "Article id", "type": "id", "rename": "id_article" }
|
||
|
},
|
||
|
"output": {
|
||
|
"article": { "description": "Selected article as JSON file", "type": "text" }
|
||
|
}
|
||
|
},
|
||
|
|
||
|
"PUT": {
|
||
|
"description": "Updates a specific article",
|
||
|
"permissions": ["journalist"],
|
||
|
"parameters": {
|
||
|
"URL0": { "description": "Article id", "type": "id", "rename": "id_article" },
|
||
|
"content": { "description": "Article's content", "type": "text" }
|
||
|
},
|
||
|
"output": {
|
||
|
"article": { "description": "Returns updated article", "type": "array<mixed>" }
|
||
|
}
|
||
|
},
|
||
|
|
||
|
"DELETE": {
|
||
|
"description": "Deletes a specific article",
|
||
|
"permissions": ["journalist"],
|
||
|
"parameters": {
|
||
|
"URL0": { "description": "Article id", "type": "id", "rename": "id_article" }
|
||
|
},
|
||
|
"output": {}
|
||
|
}
|
||
|
|
||
|
},
|
||
|
|
||
|
|
||
|
"encapsuled": {
|
||
|
"url": {
|
||
|
"with": {
|
||
|
"possible": {
|
||
|
"methods": {
|
||
|
"at": {
|
||
|
|
||
|
"each": {
|
||
|
"level": {
|
||
|
|
||
|
"GET": {
|
||
|
"description": "GET /encapsuled/url/with/possible/methods/at/each/level",
|
||
|
"permissions": [],
|
||
|
"parameters": {}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
},
|
||
|
|
||
|
"POST": {
|
||
|
"description": "POST /encapsuled/url/with/possible/methods/at",
|
||
|
"permissions": [],
|
||
|
"parameters": {}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|