Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.
/ ODBGenerator Public archive

Java servlet to generate OpenDocument Database file from Opencomp API

License

Notifications You must be signed in to change notification settings

Opencomp/ODBGenerator

Repository files navigation

ODBGenerator

Java servlet to generate OpenDocument Database file from Opencomp API

Purpose

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.

Usage

Configure API Endpoint

You need to define the address of the main Opencomp instance by filling apiURl param-value into init-param section of web.xml file.

Call servlet /ODBGenerator/generateODB?<params>

GET parameters required

Parameter Description
apikey User API Key needed to trigger Opencomp API
classroom_id Opencomp classroom_id to retrieve
Example call
http://localhost:8080/ODBGenerator/generateODB?apikey=6400711028fccfd416d7f0f783f9edc28575fe214e5dc60cbe4f230c13cd9158&classroom_id=28

HTTP responses codes meaning

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)

About

Java servlet to generate OpenDocument Database file from Opencomp API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages