main/config/modules.json

200 lines
5.2 KiB
JSON
Raw Permalink Normal View History

{
"admin": {
"POST login": {
"description": "Connexion administrateur",
"permissions": [],
"parameters": {
"username": { "description": "Identifiant de l'administrateur.", "type": "varchar(3,20,alphanumeric)" },
"password": { "description": "Mot de passe de l'administrateur.", "type": "text" }
},
"output": {
"connected": { "description": "Vrai si connecté.", "type": "boolean" }
}
},
"POST signup": {
"description": "Formulaire d'inscription",
"permissions": [],
"parameters": {
"username": { "description": "Identifiant de l'administrateur", "type": "varchar(3,20,alphanumeric)" },
"mail": { "description": "Adresse mail de l'administrateur", "type": "mail" },
"password": { "description": "Mot de passe de l'administrateur", "type": "text" }
},
"output": {
"registered": { "description": "UID du nouvel administrateur", "type": "id" }
}
2017-12-07 23:32:18 +00:00
},
"DELETE logout": {
"description": "Déconnexion utilisateur",
"permissions": [],
"parameters": {},
"output": {}
}
},
"user": {
"POST login": {
"description": "Connexion utilisateur",
"permissions": [],
"parameters": {
"username": { "description": "Identifiant de l'utilisateur.", "type": "varchar(3,20,alphanumeric)" },
"password": { "description": "Mot de passe de l'utilisateur'.", "type": "text" }
},
"output": {
"connected": { "description": "Vrai si connecté.", "type": "boolean" }
}
},
"POST signup": {
"description": "Formulaire d'inscription",
"permissions": [],
"parameters": {
"username": { "description": "Identifiant de l'utilisateur", "type": "varchar(3,20,alphanumeric)" },
"mail": { "description": "Adresse mail de l'utilisateur", "type": "mail" },
"password": { "description": "Mot de passe de l'utilisateur", "type": "text" }
},
"output": {
"registered": { "description": "UID du nouvel utilisateur", "type": "id" }
}
2017-12-07 23:32:18 +00:00
},
"DELETE logout": {
"description": "Déconnexion utilisateur",
"permissions": [],
"parameters": {},
"output": {}
}
},
"dev": {
"GET session_destroy": {
"description": "Destroy current session",
"permissions": [],
"parameters": {},
"output": {}
},
"GET release": {
"description": "Auto release git repo",
"permissions": [],
"parameters": {},
"output": {}
}
},
"message": {
"POST emergency": {
"description" : "",
"permissions": [],
"parameters": {
"URL_0": {
"description": "code departement, si le paramètre n'est pas fourni le message est envoyé en broadcast",
"type" : "numeric",
"optional" : true
},
"message": {
"description": "message a publier",
"type": "text",
"optional": false
},
"username": {
"description": "username affiché dans le channel",
"type": "varchar(3,20)",
"optional": false
},
"location": {
"description": "coordonés GPS du message, des coordonnées invalide ne seront pas affiché",
"type": "array<numeric>"
}
}
},
"DELETE emergency": {
"description" : "",
"permissions": [],
"parameters": {
"URL_0": {
"description": "code departement, si le paramètre n'est pas fourni le message est envoyé en broadcast",
"type" : "numeric",
"optional" : true
},
"id": {
"description": "message a publier",
"type": "text"
}
}
}
},
"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": {}
}
}
}