Java servlet to generate OpenDocument Database file from Opencomp API
This servlet is used by Opencomp web application to provide a way to automatically generate an OpenDocument Database file containing the pupils related to a classroom.
Informations are retrieved via Opencomp API.
You need to define the address of the main Opencomp instance by filling apiURl param-value
into init-param
section of web.xml
file.
Parameter | Description |
---|---|
apikey | User API Key needed to trigger Opencomp API |
classroom_id | Opencomp classroom_id to retrieve |
http://localhost:8080/ODBGenerator/generateODB?apikey=6400711028fccfd416d7f0f783f9edc28575fe214e5dc60cbe4f230c13cd9158&classroom_id=28
HTTP Response | Description |
---|---|
200 - OK | Browser prompt to download the generated .odb file |
401 - Unauthorized | Supplied API Key is invalid |
403 - Forbidden | Supplied API Key is valid but you do not have sufficient permission to retrieve this classroom associated data |
404 - Not Found | classroom_id supplied does not exist |
405 - Method Not Allowed | You need to use GET method |
412 - Precondition Failed | You need to supply all required parameters |
502 - Bad Gateway | API did not respond with a valid JSON string |
504 - Gateway Time-out | API did not respond within the time limit (15 sec) |