ptut-vhost/config/modules.json

454 lines
15 KiB
JSON

{
"POST": {
"des": "Returns the API documentation",
"per": [],
"par": {
"URL0": { "des": "Method name", "typ": "varchar(1,30)", "ren": "method_name", "opt": true, "def": null },
"mixed": { "des": "mixed type", "typ": "mixed", "opt": true },
"id": { "des": "id type", "typ": "id", "opt": true },
"text": { "des": "text type", "typ": "text", "opt": true },
"mail": { "des": "mail type", "typ": "mail", "opt": true },
"alphanumeric": { "des": "alphanumeric type", "typ": "alphanumeric", "opt": true },
"letters": { "des": "letters type", "typ": "letters", "opt": true },
"array": { "des": "array type", "typ": "array", "opt": true },
"array_id": { "des": "array<id> type", "typ": "array<id>", "opt": true },
"boolean": { "des": "boolean type", "typ": "boolean", "opt": true },
"object": { "des": "object type", "typ": "object", "opt": true },
"numeric": { "des": "numeric type", "typ": "numeric", "opt": true },
"float": { "des": "float type", "typ": "float", "opt": true }
}
},
"cas": {
"GET": {
"des": "Authenticatation callback (used by third-party OAuth)",
"per": [],
"par": {},
"opt": { "download": true }
},
"POST": {
"des": "Login if not already authenticated",
"per": [],
"par": {}
},
"PUT": {
"des": "Check if authenticated",
"per": [],
"par": {}
},
"DELETE": {
"des": "Logout",
"per": [],
"par": {}
}
},
"release": {
"GET": {
"des": "Pulls project from git branch.",
"per": [[]],
"par": {
"URL0": { "des": "Name of the project to release", "typ": "alphanumeric", "ren": "project", "opt": true, "def": "self" },
"URL1": { "des": "Step to run, if not given, all steps will be run", "typ": "id", "ren": "step", "opt": true }
}
}
},
"excel":{
"POST": {
"des": "Import data from an Excel file",
"per": [],
"par": {
}
}
},
"department":{
"PUT":{
"des": "Switch the user on another department database",
"per": [],
"par": {
"URL0": {"des": "Department id", "typ": "id", "ren": "department" }
}
},
"errors":{
"GET": {
"des": "Get the list of incoherence of the department",
"per": [],
"par": {
}
}
},
"stats":{
"GET": {
"des": "Get the statistics about the department",
"per": [],
"par": {
}
}
},
"save":{
"GET": {
"des": "Get the list of the saves of the department database",
"per": [],
"par": {
}
},
"POST": {
"des": "Create a backup if the name is empty, execute the backup if the name is set",
"per": [],
"par": {
"backupName" : {"des": "Backup name", "typ": "varchar(1,10,alphanumeric)", "opt" : true},
"apply" : {"des": "Should we apply the backup on production or just preview it (true : apply, false : preview)", "typ": "boolean", "opt" : true}
}
},
"DELETE": {
"des": "Delete a backup",
"per": [],
"par": {
"backupName": {"des": "Backup name", "typ": "varchar(1,10,alphanumeric)"}
}
}
}
},
"professor":{
"POST": {
"des": "Creates a new professor",
"per": [],
"par": {
"firstName": { "des": "Professor last name.", "typ": "varchar(2,30,alphanumeric)" },
"lastName": { "des": "Professor first name.", "typ": "varchar(2,30,alphanumeric)" },
"category": { "des": "Professor category UID.", "typ": "id" },
"hoursToDo": { "des": "Number of hours professor have to do", "typ": "id" },
"initials": { "des": "Professor initials", "typ": "varchar(2,8,letters)" },
"isAdmin": { "des": "Whether professor is an admin", "typ": "boolean" },
"casLogin": { "des": "Optional CAS username", "typ": "varchar(6,16,letters)", "opt": true }
},
"out": {
"created_uid": { "des": "Created professor UID", "typ": "id" }
}
},
"GET": {
"des": "Get one or all professors",
"per": [],
"par": {
"URL0": { "des": "Whether to return VH", "typ": "id", "ren": "with_vh" },
"URL1": { "des": "Optional professor UID.", "typ": "id", "ren": "prof_id", "opt": true }
},
"out": {
"professors": { "des": "Teacher list", "typ": "array" }
}
},
"DELETE": {
"des": "Deletes an existing professor",
"per": [],
"par": {
"URL0": { "des": "Professor UID.", "typ": "id", "ren": "prof_id" }
},
"out": {
"deleted": { "des": "Whether it has been deleted", "typ": "boolean" }
}
},
"PUT": {
"des": "Edits an existing professor",
"per": [],
"par": {
"URL0": { "des": "Optional professor UID.", "typ": "id", "ren": "prof_id" },
"firstName": { "des": "Professor last name.", "typ": "varchar(2,30,alphanumeric)", "opt": true },
"lastName": { "des": "Professor first name.", "typ": "varchar(2,30,alphanumeric)", "opt": true },
"category": { "des": "Professor category UID.", "typ": "id", "opt": true },
"hoursToDo": { "des": "Number of hours professor have to do", "typ": "id", "opt": true },
"initials": { "des": "Professor initials", "typ": "varchar(2,8,letters)", "opt": true },
"isAdmin": { "des": "Whether professor is an admin", "typ": "boolean", "opt": true },
"casLogin": { "des": "Optional CAS username", "typ": "varchar(6,16,letters)", "opt": true },
"remCas": { "des": "Unset CAS username", "typ": "boolean", "def": false, "opt": true }
},
"out": {
"updated": { "des": "Whether the professor has been updated", "typ": "boolean" }
}
},
"stats": {
"GET":{
"des": "Get statistics of the professor",
"per": [],
"par":{
"URL0": {"des" : "Id of the professor", "typ": "id", "ren": "idProf", "opt" : false}
}
}
},
"filter": {
"POST": {
"des": "Get matching professors (only ids) for a given filter",
"per": [],
"par": {
"categories": { "des": "Optional category ID list", "typ": "array<id>", "opt": true },
"formations": { "des": "Optional formation ID list", "typ": "array<id>", "opt": true },
"ues": { "des": "Optional UE code list", "typ": "array<varchar(2,30,alphanumeric)>", "opt": true }
},
"out": {
"matches": { "des": "Matching professor UID(s)", "typ": "array<id>" }
}
}
}
},
"ue":{
"POST": {
"des": "Creates a new UE",
"per": [],
"par": {
"code": { "des": "UE code.", "typ": "varchar(4,20,alphanumeric)" },
"label": { "des": "UE label", "typ": "varchar(4,30,alphanumeric)" },
"required": { "des": "If UE is required", "typ": "bool" },
"volumeCours": { "des": "Number of course hours for UE", "typ": "float" },
"volumeTD": { "des": "Number of TD hours for UE", "typ": "float" },
"volumeTP": { "des": "Number of TP hours for UE", "typ": "float" },
"disabled": { "des": "Whether UE is disabled", "typ": "boolean" },
"defaultFormation": { "des": "UID for optional default formation (-1 if none)", "typ": "int", "opt": true, "def": -1 }
},
"out": {
"created_code": { "des": "Created UE code", "typ": "varchar(4,20,alphanumeric)" }
}
},
"GET": {
"des": "Get one or all UE",
"per": [],
"par": {
"URL0": { "des": "Optional UE code.", "typ": "varchar(4,20,alphanumeric)", "ren": "code", "opt": true }
},
"out": {
"ues": { "des": "UE list", "typ": "array" }
}
},
"DELETE": {
"des": "Deletes an existing UE",
"per": [],
"par": {
"URL0": { "des": "UE code.", "typ": "varchar(4,20,alphanumeric)", "ren": "code" }
},
"out": {
"deleted": { "des": "Whether it has been deleted", "typ": "boolean" }
}
},
"PUT": {
"des": "Edits an existing UE",
"per": [],
"par": {
"URL0": { "des": "UE code.", "typ": "varchar(4,20,alphanumeric)", "ren": "code" },
"label": { "des": "UE label", "typ": "varchar(4,30,alphanumeric)", "opt": true },
"required": { "des": "If UE is required", "typ": "bool", "opt": true },
"volumeCours": { "des": "Number of course hours for UE", "typ": "float", "opt": true },
"volumeTD": { "des": "Number of TD hours for UE", "typ": "float", "opt": true },
"volumeTP": { "des": "Number of TP hours for UE", "typ": "float", "opt": true },
"disabled": { "des": "Whether UE is disabled", "typ": "boolean", "opt": true },
"defaultFormation": { "des": "UID for optional default formation (-1 for none)", "typ": "int", "opt": true }
},
"out": {
"updated": { "des": "Whether the UE has been updated", "typ": "boolean" }
}
},
"cours": {
"POST": {
"des" : "Creates a new Cours for an UE",
"per": [],
"par": {
"code": { "des": "Code of the UE", "typ": "varchar(4,20,alphanumeric)" },
"idProf": { "des": "Id of the professor", "typ": "id", "opt": true },
"volume": { "des": "Number of hours for Cours", "typ": "id", "opt": true, "def": 0 },
"formations": { "des": "List of formations (ids)", "typ": "array<id>", "opt": true, "def": [] }
},
"output": {
"created_id" : { "des": "The id of the created Cours", "typ": "id" }
}
},
"GET": {
"des" : "Get all cours data about a given UE",
"per": [],
"par": {
"URL0": { "des": "Code of the UE", "typ": "varchar(4,20,alphanumeric)", "ren": "code" }
}
},
"PUT": {
"des" : "Updates an existing Cours",
"per": [],
"par": {
"URL0": { "des": "Id of the Cours", "typ": "id", "ren": "idCours" },
"idProf": { "des": "Id of the professor (-1 to unset)", "typ": "int", "opt": true },
"volume": { "des": "Number of hours for Cours", "typ": "float", "opt": true },
"add_form": { "des": "Id of formations to add", "typ": "array<id>", "opt": true, "def": [] },
"rem_form": { "des": "Id of formations to remove", "typ": "array<id>", "opt": true, "def": [] }
},
"output": {
"updated" : { "des": "Whether it has been updated", "typ": "bool" }
}
},
"DELETE": {
"des" : "Deletes an existing Cours",
"per": [],
"par": {
"URL0": { "des": "Id of the Cours", "typ": "id", "ren": "idCours" }
},
"output": {
"deleted" : { "des": "Whether it has been deleted", "typ": "bool" }
}
}
},
"td": {
"POST": {
"des" : "Creates a new TD for an UE",
"per": [],
"par": {
"code": { "des": "Code of the UE", "typ": "varchar(4,20,alphanumeric)" },
"idProf": { "des": "Id of the professor", "typ": "id", "opt": true },
"volume": { "des": "Number of hours for TD", "typ": "id", "opt": true, "def": 0 },
"formations": { "des": "List of formations (ids)", "typ": "array<id>", "opt": true, "def": [] }
},
"output": {
"created_id" : { "des": "The id of the created TD", "typ": "id" }
}
},
"GET": {
"des" : "Get all TD data about a given UE",
"per": [],
"par": {
"URL0": { "des": "Code of the UE", "typ": "varchar(4,20,alphanumeric)", "ren": "code" }
}
},
"PUT": {
"des" : "Updates an existing TD",
"per": [],
"par": {
"URL0": { "des": "Id of the TD", "typ": "id", "ren": "idTD" },
"idProf": { "des": "Id of the professor (-1 to unset)", "typ": "int", "opt": true },
"volume": { "des": "Number of hours for TD", "typ": "float", "opt": true },
"add_form": { "des": "Id of formations to add", "typ": "array<id>", "opt": true, "def": [] },
"rem_form": { "des": "Id of formations to remove", "typ": "array<id>", "opt": true, "def": [] }
},
"output": {
"updated" : { "des": "Whether it has been updated", "typ": "bool" }
}
},
"DELETE": {
"des" : "Deletes an existing TD",
"per": [],
"par": {
"URL0": { "des": "Id of the TD", "typ": "id", "ren": "idTD" }
},
"output": {
"deleted" : { "des": "Whether it has been deleted", "typ": "bool" }
}
}
},
"tp": {
"POST": {
"des" : "Creates a new TP for an UE",
"per": [],
"par": {
"code": { "des": "Code of the UE", "typ": "varchar(4,20,alphanumeric)" },
"idProf": { "des": "Id of the professor", "typ": "id", "opt": true },
"volume": { "des": "Number of hours for TP", "typ": "id", "opt": true, "def": 0 },
"formations": { "des": "List of formations (ids)", "typ": "array<id>", "opt": true, "def": [] }
},
"output": {
"created_id" : { "des": "The id of the created TP", "typ": "id" }
}
},
"GET": {
"des" : "Get all TP data about a given UE",
"per": [],
"par": {
"URL0": { "des": "Code of the UE", "typ": "varchar(4,20,alphanumeric)", "ren": "code" }
}
},
"PUT": {
"des" : "Updates an existing TP",
"per": [],
"par": {
"URL0": { "des": "Id of the TP", "typ": "id", "ren": "idTP" },
"idProf": { "des": "Id of the professor (-1 to unset)", "typ": "int", "opt": true },
"volume": { "des": "Number of hours for TP", "typ": "float", "opt": true },
"add_form": { "des": "Id of formations to add", "typ": "array<id>", "opt": true, "def": [] },
"rem_form": { "des": "Id of formations to remove", "typ": "array<id>", "opt": true, "def": [] }
},
"output": {
"updated" : { "des": "Whether it has been updated", "typ": "bool" }
}
},
"DELETE": {
"des" : "Deletes an existing TP",
"per": [],
"par": {
"URL0": { "des": "Id of the TP", "typ": "id", "ren": "idTP" }
},
"output": {
"deleted" : { "des": "Whether it has been deleted", "typ": "bool" }
}
}
}
},
"formation": {
"GET":{
"des": "Get all data about a formation",
"per": [],
"par": {
"URL0":{"des" : "Id of the formation", "typ": "id", "ren": "form_id", "opt" : true }
}
}
},
"category": {
"GET": {
"des" : "Get all data about a given category | all",
"per": [],
"par": {
"URL0": { "des": "Id of the category", "typ": "id", "ren": "cat_id", "opt": true }
}
}
}
}