2017-11-23 10:23:09 +00:00
|
|
|
{
|
|
|
|
|
2017-12-07 20:51:32 +00:00
|
|
|
"admin": {
|
|
|
|
|
|
|
|
"POST login": {
|
2017-11-26 12:49:13 +00:00
|
|
|
"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" }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2017-12-06 12:23:37 +00:00
|
|
|
"POST signup": {
|
|
|
|
"description": "Formulaire d'inscription",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2017-12-07 20:51:32 +00:00
|
|
|
"username": { "description": "Identifiant de l'administrateur", "type": "varchar(3,20,alphanumeric)" },
|
2017-12-07 22:04:07 +00:00
|
|
|
"mail": { "description": "Adresse mail de l'administrateur", "type": "mail" },
|
2017-12-07 20:51:32 +00:00
|
|
|
"password": { "description": "Mot de passe de l'administrateur", "type": "text" }
|
2017-12-06 12:23:37 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2017-12-07 20:51:32 +00:00
|
|
|
"registered": { "description": "UID du nouvel administrateur", "type": "id" }
|
2017-12-06 12:23:37 +00:00
|
|
|
}
|
2017-12-07 23:32:18 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
"DELETE logout": {
|
|
|
|
"description": "Déconnexion utilisateur",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {},
|
|
|
|
"output": {}
|
2017-12-07 20:51:32 +00:00
|
|
|
}
|
2017-12-06 12:23:37 +00:00
|
|
|
|
2017-12-07 20:51:32 +00:00
|
|
|
},
|
2017-12-06 12:23:37 +00:00
|
|
|
|
2017-12-07 20:51:32 +00:00
|
|
|
"user": {
|
2017-12-06 12:23:37 +00:00
|
|
|
|
2017-12-07 20:51:32 +00:00
|
|
|
"POST login": {
|
|
|
|
|
|
|
|
"description": "Connexion utilisateur",
|
2017-12-06 12:23:37 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2017-12-07 20:51:32 +00:00
|
|
|
"username": { "description": "Identifiant de l'utilisateur.", "type": "varchar(3,20,alphanumeric)" },
|
|
|
|
"password": { "description": "Mot de passe de l'utilisateur'.", "type": "text" }
|
2017-12-06 12:23:37 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2017-12-07 20:51:32 +00:00
|
|
|
"connected": { "description": "Vrai si connecté.", "type": "boolean" }
|
2017-12-06 12:23:37 +00:00
|
|
|
}
|
2017-12-07 20:51:32 +00:00
|
|
|
|
2017-12-06 12:23:37 +00:00
|
|
|
},
|
|
|
|
|
2017-12-07 20:51:32 +00:00
|
|
|
"POST signup": {
|
|
|
|
"description": "Formulaire d'inscription",
|
2017-12-06 12:23:37 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2017-12-07 20:51:32 +00:00
|
|
|
"username": { "description": "Identifiant de l'utilisateur", "type": "varchar(3,20,alphanumeric)" },
|
2017-12-07 22:04:07 +00:00
|
|
|
"mail": { "description": "Adresse mail de l'utilisateur", "type": "mail" },
|
2017-12-07 20:51:32 +00:00
|
|
|
"password": { "description": "Mot de passe de l'utilisateur", "type": "text" }
|
2017-12-06 12:23:37 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2017-12-07 20:51:32 +00:00
|
|
|
"registered": { "description": "UID du nouvel utilisateur", "type": "id" }
|
2017-12-06 12:23:37 +00:00
|
|
|
}
|
2017-12-07 23:32:18 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
"DELETE logout": {
|
|
|
|
"description": "Déconnexion utilisateur",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {},
|
|
|
|
"output": {}
|
2017-11-26 12:49:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
2017-12-06 16:41:25 +00:00
|
|
|
"dev": {
|
|
|
|
|
|
|
|
"GET session_destroy": {
|
|
|
|
"description": "Destroy current session",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {},
|
|
|
|
"output": {}
|
2017-12-07 15:34:36 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
"GET release": {
|
|
|
|
"description": "Auto release git repo",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {},
|
|
|
|
"output": {}
|
2017-12-06 16:41:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
2017-12-07 19:24:59 +00:00
|
|
|
"message": {
|
|
|
|
"POST emergency": {
|
|
|
|
"description" : "",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2017-12-08 02:39:29 +00:00
|
|
|
"URL_0": { "description": "code departement, si le paramètre n'est pas fourni le message est envoyé en broadcast", "type" : "numeric" },
|
|
|
|
"message": { "description": "message a publier", "type": "text" },
|
|
|
|
"location": { "description": "coordonés GPS du message, des coordonnées invalide ne seront pas affiché", "type": "array<numeric>" }
|
2017-12-07 19:24:59 +00:00
|
|
|
}
|
2017-12-07 22:40:05 +00:00
|
|
|
},
|
|
|
|
"DELETE emergency": {
|
2017-12-07 23:43:58 +00:00
|
|
|
"description": "",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2017-12-08 02:39:29 +00:00
|
|
|
"URL_0": { "description": "code departement, si le paramètre n'est pas fourni le message est envoyé en broadcast", "type": "numeric" },
|
|
|
|
"id": { "description": "message a publier", "type": "text" }
|
2017-12-07 23:43:58 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"PUT emergency": {
|
2017-12-07 22:40:05 +00:00
|
|
|
"description" : "",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2017-12-08 02:39:29 +00:00
|
|
|
"URL_0": { "description": "code departement, si le paramètre n'est pas fourni le message est envoyé en broadcast", "type": "numeric" },
|
|
|
|
"id": { "description": "message a publier", "type": "text" },
|
|
|
|
"message": { "description": "message a publier", "type": "text" }
|
2017-12-08 00:56:21 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"GET emergency": {
|
|
|
|
"description" : "",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2017-12-08 01:31:31 +00:00
|
|
|
"URL_0": { "description": "code departement, si le paramètre n'est pas fourni le message est envoyé en broadcast", "type" : "numeric" },
|
|
|
|
"limit": { "description": "nombre de message a récupérer maximum", "type" : "numeric", "optional": true }
|
2017-12-08 00:56:21 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"POST event": {
|
|
|
|
"description" : "",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2017-12-08 01:31:31 +00:00
|
|
|
"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 },
|
|
|
|
"type": { "description": "Flag du type d'evenement", "type": "numeric" },
|
|
|
|
"location": { "description": "coordonés GPS du message, des coordonnées invalide ne seront pas affiché", "type": "array<numeric>" }
|
2017-12-08 00:56:21 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"DELETE event": {
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"PUT event": {
|
|
|
|
"description" : "",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
|
|
|
"URL_0": {
|
|
|
|
"description": "code departement, si le paramètre n'est pas fourni le message est envoyé en broadcast",
|
2017-12-07 22:40:05 +00:00
|
|
|
"type" : "numeric",
|
|
|
|
"optional" : true
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"description": "message a publier",
|
|
|
|
"type": "text"
|
2017-12-07 23:43:58 +00:00
|
|
|
},
|
|
|
|
"message": {
|
|
|
|
"description": "message a publier",
|
|
|
|
"type": "text",
|
|
|
|
"optional": false
|
2017-12-07 22:40:05 +00:00
|
|
|
}
|
|
|
|
}
|
2017-12-07 19:24:59 +00:00
|
|
|
}
|
2017-12-07 23:43:58 +00:00
|
|
|
|
2017-12-07 19:24:59 +00:00
|
|
|
},
|
2017-11-26 12:49:13 +00:00
|
|
|
|
2017-11-23 10:23:09 +00:00
|
|
|
"RESTexample": {
|
|
|
|
"POST article": {
|
|
|
|
"description": "Posts a new article",
|
2017-11-23 10:34:20 +00:00
|
|
|
"permissions": [["journalist"]],
|
2017-11-23 10:23:09 +00:00
|
|
|
"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",
|
2017-11-23 10:34:20 +00:00
|
|
|
"permissions": [["viewer"], ["journalist"]],
|
2017-11-23 10:23:09 +00:00
|
|
|
"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)",
|
2017-11-23 10:34:20 +00:00
|
|
|
"permissions": [["viewer"], ["journalist"]],
|
2017-11-23 10:23:09 +00:00
|
|
|
"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",
|
2017-11-23 10:34:20 +00:00
|
|
|
"permissions": [["journalist"]],
|
2017-11-23 10:23:09 +00:00
|
|
|
"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",
|
2017-11-23 10:34:20 +00:00
|
|
|
"permissions": [["journalist"]],
|
2017-11-23 10:23:09 +00:00
|
|
|
"parameters": {
|
|
|
|
"URL_0": { "description": "Article id", "type": "id" }
|
|
|
|
},
|
|
|
|
"output": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|