462 lines
16 KiB
JSON
Executable File
462 lines
16 KiB
JSON
Executable File
{
|
|
|
|
"module": {
|
|
"method": {
|
|
"description": "Test de l'API",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {}
|
|
},
|
|
|
|
"markdown": {
|
|
"description": "Retourne une description en markdown des différents modules de l'API",
|
|
"permissions": ["warehouse", "admin"],
|
|
"options": { "download": true },
|
|
"parameters": {}
|
|
},
|
|
|
|
"apiBlueprint": {
|
|
"description": "Retourne une documentation de l'API au format API Blueprint.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"options": { "download": true },
|
|
"parameters": {}
|
|
}
|
|
},
|
|
|
|
|
|
"upload": {
|
|
|
|
"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" }
|
|
},
|
|
"output": {
|
|
"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>" }
|
|
}
|
|
}
|
|
},
|
|
|
|
"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 }
|
|
}
|
|
}
|
|
},
|
|
|
|
|
|
"authentificationDefault": {
|
|
"warehouse": {
|
|
"description": "Connexion de premier niveau : entrepot.",
|
|
"permissions": [],
|
|
"parameters": {
|
|
"name": { "description": "Nom de l'entrepot.", "type": "varchar(3,30,alphanumeric)" },
|
|
"password": { "description": "Mot de passe de l'entrepot.", "type": "text" }
|
|
},
|
|
"output": {
|
|
"status": { "description": "Status de la connexion.", "type": "boolean" }
|
|
}
|
|
},
|
|
|
|
"admin": {
|
|
"description": "Connexion de second niveau : administrateur.",
|
|
"permissions": ["warehouse"],
|
|
"parameters": {
|
|
"username": { "description": "Identifiant de l'administrateur.", "type": "varchar(1,30,alphanumeric)" },
|
|
"password": { "description": "Mot de passe de l'administrateur'.", "type": "text" }
|
|
},
|
|
"output": {
|
|
"status": { "description": "Status de la connexion.", "type": "boolean" }
|
|
}
|
|
}
|
|
},
|
|
|
|
|
|
"userDefault": {
|
|
|
|
"create": {
|
|
"description": "Création d'un nouvel utilisateur.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"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" }
|
|
},
|
|
"output": {
|
|
"id_user": { "description": "UID de l'utilisateur créé.", "type": "id" },
|
|
"id_group": { "description": "UID du groupe de l'utilisateur.", "type": "id" }
|
|
}
|
|
},
|
|
|
|
"link": {
|
|
"description": "Ajout d'un utilisateur à un groupe.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_cluster": { "description": "UID du groupe auquel rattacher.", "type": "id" },
|
|
"id_user": { "description": "UID de l'utilisateur à rattacher.", "type": "id" }
|
|
},
|
|
"output": {}
|
|
},
|
|
|
|
|
|
"unlink": {
|
|
"description": "Retrait d'un utilisateur d'un groupe",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_cluster": { "description": "UID du groupe auquel détacher.", "type": "id" },
|
|
"id_user": { "description": "UID de l'utilisateur à détacher.", "type": "id" }
|
|
},
|
|
"output": {}
|
|
},
|
|
|
|
"search": {
|
|
"description": "Recherche d'un utilisateur par mots-clés.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"keywords": { "description": "Mots-clés de la recherche.", "type": "text" }
|
|
},
|
|
"output": {
|
|
"users": { "description": "Liste des utilisateurs correspondants aux mots-clés.", "type": "array<mixed>" }
|
|
}
|
|
},
|
|
|
|
"getAll": {
|
|
"description": "Liste de tous les utilisateurs",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {},
|
|
"output": {
|
|
"users": { "description": "Liste de tous les utilisateurs.", "type": "array<array<mixed>>" }
|
|
}
|
|
},
|
|
|
|
"getById": {
|
|
"description": "Retourne un utilisateur spécifique.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_user": { "description": "UID de l'utilisateur.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"user": { "description": "Données de l'utilisateur.", "type": "array<mixed>" }
|
|
}
|
|
},
|
|
|
|
"getByCode": {
|
|
"description": "Retourne un utilisateur de Code RFID donné.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"code": { "description": "Code RFID de l'utilisateur.", "type": "rfid" }
|
|
},
|
|
"output": {
|
|
"user": { "description": "Données de l'utilisateur.", "type": "array<mixed>" }
|
|
}
|
|
},
|
|
|
|
"getByUsername": {
|
|
"description": "Retourne un utilisateur d'identifiant donné.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"username": { "description": "Identifiant de l'utilisateur.", "type": "varchar(1,30,alphanumeric)" }
|
|
},
|
|
"output": {
|
|
"user": { "description": "Données de l'utilisateur.", "type": "array<mixed>" }
|
|
}
|
|
},
|
|
|
|
"getClusters": {
|
|
"description": "Retourne les groupes d'un utilisateur.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_user": { "description": "UID de l'utilisateur.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"clusters": { "description": "Liste des groupes de l'utilisateur.", "type": "array<array<mixed>>" }
|
|
}
|
|
},
|
|
|
|
"edit": {
|
|
"description": "Modifie les attributs d'un utilisateur.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"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 }
|
|
|
|
},
|
|
"output": {
|
|
"status": { "description": "Status de la modification.", "type": "boolean" }
|
|
}
|
|
},
|
|
|
|
"delete": {
|
|
"description": "Suppression d'un utilisateur.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_user": { "description": "UID de l'utilisateur.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"status": { "description": "Status de la suppression.", "type": "boolean" }
|
|
}
|
|
}
|
|
|
|
},
|
|
|
|
|
|
"machineDefault": {
|
|
|
|
"sync": {
|
|
"description": "Synchronisation d'une machine.",
|
|
"permissions": ["warehouse"],
|
|
"parameters": {
|
|
"token": { "description": "Code d'accès évolutif dynamique.", "type": "hash" },
|
|
"data": { "description": "Données (dépendent des modules).", "type": "array<mixed>" },
|
|
"renew": { "description": "Nouveau code d'accès.", "type": "hash", "optional": true }
|
|
},
|
|
"output": {
|
|
"data": { "description": "Données (dépendent des modules).", "type": "array<mixed>" }
|
|
}
|
|
},
|
|
|
|
"init": {
|
|
"description": "Données d'initialisation d'une machine.",
|
|
"permissions": ["warehouse"],
|
|
"parameters": {
|
|
"id_machine": { "description": "UID de la machine.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"data": { "description": "Données d'initialisation.", "type": "array<mixed>" }
|
|
}
|
|
},
|
|
|
|
"create": {
|
|
"description": "Création d'une nouvelle machine.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"name": { "description": "Nom de la machine.", "type": "varchar(1,30,alphanumeric)" }
|
|
},
|
|
"output": {
|
|
"id_machine": { "description": "UID de la machine.", "type": "id" },
|
|
"id_cluster": { "description": "UID du groupe de la machine.", "type": "id" }
|
|
}
|
|
},
|
|
|
|
"link": {
|
|
"description": "Ajout d'une machine à un groupe.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_machine": { "description": "UID de la machine.", "type": "id" },
|
|
"id_cluster": { "description": "UID du groupe de la machine.", "type": "id" }
|
|
},
|
|
"output": {}
|
|
},
|
|
|
|
"unlink": {
|
|
"description": "Retrait d'une machine d'un groupe.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_machine": { "description": "UID de la machine.", "type": "id" },
|
|
"id_cluster": { "description": "UID du groupe de la machine.", "type": "id" }
|
|
},
|
|
"output": {}
|
|
},
|
|
|
|
"search": {
|
|
"description": "Recherche une machine par mots-clés.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"keywords": { "description": "Mots-clés de recherche de machine", "type": "text" }
|
|
},
|
|
"output": {
|
|
"machines": { "description": "Liste des machines correspondant à la recherche.", "type": "array<array<mixed>>" }
|
|
}
|
|
},
|
|
|
|
"getAll": {
|
|
"description": "Retourne la liste de toutes les machines.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {},
|
|
"output": {
|
|
"machines": { "description": "Liste de toutes les machines.", "type": "array<array<mixed>>" }
|
|
}
|
|
},
|
|
|
|
"getById": {
|
|
"description": "Retourne les données d'une machine.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_machine": { "description": "UID de la machine.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"machine": { "description": "Données de la machine.", "type": "array<mixed>" }
|
|
}
|
|
},
|
|
|
|
"getByName": {
|
|
"description": "Retourne les données d'une machine de nom donné.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"name": { "description": "Nom de la machine.", "type": "varchar(1,30,alphanumeric)" }
|
|
},
|
|
"output": {
|
|
"machine": { "description": "Données de la machine.", "type": "array<mixed>" }
|
|
}
|
|
},
|
|
|
|
"getClusters": {
|
|
"description": "Retourne les groupes d'une machine.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_machine": { "description": "UID de la machine.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"clusters": { "description": "Liste des groupes de la machine.", "type": "array<array<mixed>>" }
|
|
}
|
|
},
|
|
|
|
"edit": {
|
|
"description": "Modifie les attributs d'une machine.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_machine": { "description": "UID de la machine.", "type": "id" },
|
|
"name": { "description": "Nom de la machine.", "type": "varchar(1,30,alphanumeric)", "optional": true }
|
|
},
|
|
"output": {}
|
|
},
|
|
|
|
"delete": {
|
|
"description": "Supprime une machine.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_machine": { "description": "UID de la machine.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"status": { "description": "Status de la suppression.", "type": "boolean" }
|
|
}
|
|
}
|
|
|
|
},
|
|
|
|
|
|
"clusterDefault": {
|
|
|
|
"create": {
|
|
"description": "Création d'un nouveau groupe.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"name": { "description": "Nom du groupe.", "type": "varchar(1,30,alphanumeric)" },
|
|
"class": { "description": "Type de groupe.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"id_cluster": { "description": "UID du groupe créé.", "type": "id" }
|
|
}
|
|
},
|
|
|
|
"search": {
|
|
"description": "Recherche d'un groupe par mots-clés.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"keywords": { "description": "Mots-clés de la recherche.", "type": "text" },
|
|
"class": { "description": "Type de groupe.", "type": "int", "optional": true }
|
|
},
|
|
"output": {
|
|
"clusters": { "description": "Liste des groupes correspondants aux mots-clés.", "type": "array<mixed>" }
|
|
}
|
|
},
|
|
|
|
"getAll": {
|
|
"description": "Liste de tous les groupes",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"class": { "description": "Type de groupe.", "type": "id" },
|
|
"class": { "description": "Type de groupe.", "type": "id", "optional": true }
|
|
},
|
|
"output": {
|
|
"clusters": { "description": "Liste de tous les groupes.", "type": "array<array<mixed>>" }
|
|
}
|
|
},
|
|
|
|
"getById": {
|
|
"description": "Retourne un groupe spécifique.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_cluster": { "description": "UID du groupe.", "type": "id" },
|
|
"class": { "description": "Type de groupe.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"cluster": { "description": "Données du groupe.", "type": "array<mixed>" }
|
|
}
|
|
},
|
|
|
|
"getByName": {
|
|
"description": "Retourne un groupe de nom donné.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"name": { "description": "Nom du groupe.", "type": "varchar(1,30,alphanumeric)" },
|
|
"class": { "description": "Type de groupe.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"cluster": { "description": "Données du groupe.", "type": "array<mixed>" }
|
|
}
|
|
},
|
|
|
|
"getMembers": {
|
|
"description": "Retourne les membres d'un groupe.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_cluster": { "description": "UID du groupe.", "type": "id" },
|
|
"class": { "description": "Type de groupe.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"members": { "description": "Liste des membres du groupe.", "type": "array<array<mixed>>" }
|
|
}
|
|
},
|
|
|
|
"edit": {
|
|
"description": "Modifie le nom d'un groupe.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_cluster": { "description": "UID du groupe.", "type": "id" },
|
|
"class": { "description": "Type de groupe.", "type": "id" },
|
|
"name": { "description": "Nom du groupe.", "type": "varchar(1,30,alphanumeric)" }
|
|
},
|
|
"output": {
|
|
"status": { "description": "Status de la modification.", "type": "boolean" }
|
|
}
|
|
},
|
|
|
|
"delete": {
|
|
"description": "Suppression d'un groupe.",
|
|
"permissions": ["warehouse", "admin"],
|
|
"parameters": {
|
|
"id_cluster": { "description": "UID du groupe.", "type": "id" },
|
|
"class": { "description": "Type de groupe.", "type": "id" }
|
|
},
|
|
"output": {
|
|
"status": { "description": "Status de la suppression.", "type": "boolean" }
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|