2017-11-23 10:23:09 +00:00
|
|
|
{
|
|
|
|
|
2017-11-26 12:49:13 +00:00
|
|
|
"authentication": {
|
|
|
|
"POST admin": {
|
|
|
|
"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 user": {
|
|
|
|
"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" }
|
|
|
|
}
|
2017-12-06 12:23:37 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
"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": "text" },
|
|
|
|
"password": { "description": "Mot de passe de l'utilisateur", "type": "text" }
|
|
|
|
},
|
|
|
|
"output": {
|
|
|
|
"sent": { "description": "Etat de l'inscription, VRAI si le mail de confirmation a été envoyé", "type": "boolean" }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"GET signup_token": {
|
|
|
|
"description": "Validation de l'inscription par lien envoyé par mail",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
|
|
|
"URL_0": { "description": "Token de confirmation URL", "type": "hash" }
|
|
|
|
},
|
|
|
|
"output": {
|
|
|
|
"confirmed": { "description": "Etat de la validité du token", "type": "boolean" }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"POST pass": {
|
|
|
|
"description": "Demande de nouveau mot de passe",
|
|
|
|
"permissions": ["user"],
|
|
|
|
"parameters": {},
|
|
|
|
"output": {
|
|
|
|
"sent": { "description": "Etat de la demande de nouveau mot de passe, VRAI si le mail de confirmation a été envoyé", "type": "boolean" }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"POST pass_token": {
|
|
|
|
"description": "Changement de mot de passe",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
|
|
|
"URL_0": { "description": "Token de confirmation URL", "type": "hash" }
|
|
|
|
},
|
|
|
|
"output": {
|
|
|
|
"confirmed": { "description": "Etat de la validité du token", "type": "boolean" }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"POST pass_update": {
|
|
|
|
"description": "Changement de mot de passe",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
|
|
|
"password": { "description": "Nouveau mot de passe", "type": "text" }
|
|
|
|
},
|
|
|
|
"output": {
|
|
|
|
"updated": { "description": "Vrai si mot de passe mis à jour", "type": "boolean" }
|
|
|
|
}
|
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": {
|
|
|
|
"URL_0": {
|
|
|
|
"description": "code departement, si le paramètre n'est pas fourni le message est envoyé en broadcast",
|
2017-12-07 20:06:09 +00:00
|
|
|
"type" : "numeric",
|
2017-12-07 19:24:59 +00:00
|
|
|
"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é",
|
2017-12-07 20:06:09 +00:00
|
|
|
"type": "array<numeric>"
|
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": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|