2016-02-04 18:23:16 +00:00
|
|
|
{
|
2016-07-02 15:46:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
"machineDefault" :[
|
2016-02-11 15:00:41 +00:00
|
|
|
"create",
|
|
|
|
|
2016-02-14 14:17:26 +00:00
|
|
|
"link",
|
|
|
|
"unlink",
|
2016-02-11 15:00:41 +00:00
|
|
|
|
2016-02-16 13:25:06 +00:00
|
|
|
"search",
|
|
|
|
|
2016-02-14 14:17:26 +00:00
|
|
|
"getAll",
|
|
|
|
"getById",
|
|
|
|
"getByCode",
|
2016-07-02 15:46:59 +00:00
|
|
|
"getByName",
|
|
|
|
|
2016-02-14 14:17:26 +00:00
|
|
|
"getClusters",
|
|
|
|
|
2016-02-16 08:03:12 +00:00
|
|
|
"edit",
|
|
|
|
|
2016-02-14 14:17:26 +00:00
|
|
|
"delete"
|
2016-07-02 16:35:34 +00:00
|
|
|
],
|
2016-02-12 21:48:16 +00:00
|
|
|
|
2016-02-14 14:17:26 +00:00
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"module": {
|
|
|
|
"method": {
|
|
|
|
"description": "Test de l'API",
|
|
|
|
"permissions": [],
|
|
|
|
"parameters": {}
|
|
|
|
},
|
2016-02-16 13:32:33 +00:00
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"phpunitParams": {
|
|
|
|
"description": "Méthode utile à phpunit pour le test des paramètres.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"p1": { "description": "Texte", "type": "text" },
|
|
|
|
"p2": { "description": "Entier positif", "type": "id" }
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"receivedArguments": { "description": "Liste des arguments reçus par la méthode", "type": "array<mixed>" }
|
2016-07-02 15:46:59 +00:00
|
|
|
}
|
|
|
|
},
|
2016-02-14 14:17:26 +00:00
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"phpunitOptionalParams": {
|
|
|
|
"description": "Méthode utile à phpunit pour le test des paramètres optionnels.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"p1": { "description": "Texte", "type": "text" },
|
|
|
|
"p2": { "description": "Texte", "type": "text", "optional": false },
|
|
|
|
"p3": { "description": "Entier positif (optionnel)", "type": "id", "optional": true }
|
|
|
|
}
|
|
|
|
},
|
2016-07-02 15:46:59 +00:00
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"phpunitPermissions": {
|
|
|
|
"description": "Méthode utile à phpunit pour le test des permissions.",
|
|
|
|
"permissions": ["a", "b"],
|
|
|
|
"parameters": {}
|
|
|
|
},
|
2016-07-02 15:46:59 +00:00
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
|
|
|
|
"markdown": {
|
|
|
|
"description": "Retourne une description en markdown des différents modules de l'API",
|
|
|
|
"permissions": [],
|
|
|
|
"options": { "download": true },
|
|
|
|
"parameters": {}
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
|
|
|
|
"apiBlueprint": {
|
|
|
|
"description": "Retourne une documentation de l'API au format API Blueprint.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
2016-07-02 16:35:34 +00:00
|
|
|
"options": { "download": true },
|
|
|
|
"parameters": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
"upload": {
|
2016-07-02 15:46:59 +00:00
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"call_log": {
|
|
|
|
"description": "Upload d'un journal d'appel au format .xml. Retour des données de call_log/unserialize",
|
|
|
|
"permissions": ["admin"],
|
|
|
|
"parameters": {
|
|
|
|
"file": { "description": "Fichier du journal d'appel.", "type": "FILE" }
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"tmp_id": { "description": "Identifiant temporaire du journal d'appel", "type": "varchar(40,40)" },
|
|
|
|
"directory": { "description": "Annuaire des contacts trouvés", "type": "array<array<mixed>>" },
|
|
|
|
"call": { "description": "Liste des identifiants des contacts triés par nombre d'appels", "type": "array<id>" },
|
|
|
|
"sms": { "description": "Liste des identifiants des contacts triés par nombre de sms", "type": "array<id>" }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2016-07-02 15:46:59 +00:00
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
|
|
|
|
"download": {
|
|
|
|
|
|
|
|
"multiple": {
|
|
|
|
"description": "Download des données relatives aux sujets donnés.",
|
|
|
|
"permissions": ["admin"],
|
|
|
|
"options": { "download": true },
|
|
|
|
"parameters": {
|
|
|
|
"subjects": { "description": "Identifiants des sujets d'enquêtes à intégrer.", "type": "array<id>", "optional": true },
|
|
|
|
"phone": { "description": "Si vaut TRUE, renvoie les sujets cellulaires.", "type": "boolean", "optional": true },
|
|
|
|
"facebook": { "description": "Si vaut TRUE, renvoie les sujet facebook.", "type": "boolean", "optional": true },
|
|
|
|
"survey": { "description": "Si vaut TRUE, renvoie les sujets ResTIC.", "type": "boolean", "optional": true },
|
|
|
|
"all": { "description": "Si vaut TRUE, renvoie tous les sujets enregistrés.", "type": "boolean", "optional": true }
|
2016-07-02 15:46:59 +00:00
|
|
|
}
|
2016-07-02 16:35:34 +00:00
|
|
|
}
|
|
|
|
},
|
2016-07-02 15:46:59 +00:00
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"userDefault": {
|
|
|
|
|
|
|
|
"create": {
|
|
|
|
"description": "Création d'un nouvel utilisateur.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"code": { "description": "Code RFID de l'utilisateur.", "type": "rfid" },
|
|
|
|
"username": { "description": "Identifiant de l'utilisateur.", "type": "varchar(1,30,alphanumeric)" },
|
|
|
|
"firstname": { "description": "Prénom de l'utilisateur.", "type": "varchar(3,30,letters)" },
|
|
|
|
"lastname": { "description": "Nom de l'utilisateur.", "type": "varchar(3,30,letters)" },
|
|
|
|
"mail": { "description": "Adresse mail de l'utilisateur.", "type": "mail" },
|
|
|
|
"password": { "description": "Mot de passe de l'utilisateur.", "type": "text" },
|
|
|
|
"status": { "description": "Status de l'utilisateur.", "type": "status" }
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"id_user": { "description": "UID de l'utilisateur créé.", "type": "id" },
|
|
|
|
"id_group": { "description": "UID du groupe de l'utilisateur.", "type": "id" }
|
2016-07-02 15:46:59 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"link": {
|
|
|
|
"description": "Ajout d'un utilisateur à un groupe.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"id_cluster": { "description": "UID du groupe auquel rattacher.", "type": "id" },
|
|
|
|
"id_user": { "description": "UID de l'utilisateur à rattacher.", "type": "id" }
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
2016-07-02 16:35:34 +00:00
|
|
|
"output": {}
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
|
|
|
|
"unlink": {
|
|
|
|
"description": "Retrait d'un utilisateur d'un groupe",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"id_cluster": { "description": "UID du groupe auquel détacher.", "type": "id" },
|
|
|
|
"id_user": { "description": "UID de l'utilisateur à détacher.", "type": "id" }
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
"output": {
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"search": {
|
|
|
|
"description": "Recherche d'un utilisateur par mots-clés.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"keywords": { "description": "Mots-clés de la recherche.", "type": "text" }
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"users": { "description": "Liste des utilisateurs correspondants aux mots-clés.", "type": "array<mixed>" }
|
2016-07-02 15:46:59 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"getAll": {
|
|
|
|
"description": "Liste de tous les utilisateurs",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
2016-07-02 16:35:34 +00:00
|
|
|
"parameters": {},
|
2016-07-02 15:46:59 +00:00
|
|
|
"output": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"users": { "description": "Liste de tous les utilisateurs.", "type": "array<array<mixed>>" }
|
2016-07-02 15:46:59 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"getById": {
|
|
|
|
"description": "Retourne un utilisateur spécifique.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"id_user": { "description": "UID de l'utilisateur.", "type": "id" }
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"user": { "description": "Données de l'utilisateur.", "type": "array<mixed>" }
|
2016-07-02 15:46:59 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"getByCode": {
|
|
|
|
"description": "Retourne un utilisateur de Code RFID donné.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"code": { "description": "Code RFID de l'utilisateur.", "type": "rfid" }
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"user": { "description": "Données de l'utilisateur.", "type": "array<mixed>" }
|
2016-07-02 15:46:59 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"getByUsername": {
|
|
|
|
"description": "Retourne un utilisateur d'identifiant donné.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"username": { "description": "Identifiant de l'utilisateur.", "type": "varchar(1,30,alphanumeric)" }
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"user": { "description": "Données de l'utilisateur.", "type": "array<mixed>" }
|
2016-07-02 15:46:59 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"getClusters": {
|
|
|
|
"description": "Retourne les groupes d'un utilisateur.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"id_user": { "description": "UID de l'utilisateur.", "type": "id" }
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"clusters": { "description": "Liste des groupes de l'utilisateur.", "type": "array<array<mixed>>" }
|
2016-07-02 15:46:59 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"edit": {
|
|
|
|
"description": "Modifie les attributs d'un utilisateur.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"id_user": { "description": "UID de l'utilisateur.", "type": "id" },
|
|
|
|
"code": { "description": "Code RFID de l'utilisateur.", "type": "rfid", "optional": true },
|
|
|
|
"username": { "description": "Identifiant de l'utilisateur.", "type": "varchar(1,30,alphanumeric)", "optional": true },
|
|
|
|
"firstname": { "description": "Prénom de l'utilisateur.", "type": "varchar(3,30,letters)", "optional": true },
|
|
|
|
"lastname": { "description": "Nom de l'utilisateur.", "type": "varchar(3,30,letters)", "optional": true },
|
|
|
|
"mail": { "description": "Adresse mail de l'utilisateur.", "type": "mail", "optional": true },
|
|
|
|
"password": { "description": "Mot de passe de l'utilisateur.", "type": "text", "optional": true },
|
|
|
|
"status": { "description": "Status de l'utilisateur.", "type": "status", "optional": true }
|
2016-07-02 15:46:59 +00:00
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
},
|
|
|
|
"output": {
|
|
|
|
"status": { "description": "Status de la modification.", "type": "boolean" }
|
|
|
|
}
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
"delete": {
|
|
|
|
"description": "Suppression d'un utilisateur.",
|
2016-07-02 15:46:59 +00:00
|
|
|
"permissions": [],
|
|
|
|
"parameters": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"id_user": { "description": "UID de l'utilisateur.", "type": "id" }
|
2016-07-02 15:46:59 +00:00
|
|
|
},
|
|
|
|
"output": {
|
2016-07-02 16:35:34 +00:00
|
|
|
"status": { "description": "Status de la suppression.", "type": "boolean" }
|
2016-07-02 15:46:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-02 16:35:34 +00:00
|
|
|
}
|
2016-07-02 15:46:59 +00:00
|
|
|
|
2016-02-10 07:54:23 +00:00
|
|
|
|
2016-07-02 15:46:59 +00:00
|
|
|
}
|