Export Data - PaVoS-TECO/core GitHub Wiki
Export interaction
It is possible to get different kinds of information and start different processes by using the ExportServlet. All of these are summed up here. All of these requests are running on the same servlet and differentiated by the "requestType" parameter. The parameters are passed by using GET functionality. If the parameters are wrong or some are missing, an http error 400 is sent back.
1 Start new Export
Starts a new export with the required parameters. For example:
example.com/edms/get?requestType=newExport&downloadID=SomeAlphanumericID&extension=csv&timeFrame=ASTandardizedTimeFrame&observedProperties=Comma,Separated,Properties&clusters=Comma,Separated,ClusterIDs
- downloadID : is a hashed String from the information about the requested export. So if the same export is requested two times, only one export is done and both get to download the same file.
- extension : is the filetype that should be used for the export. Possible types can be requested as defined below.
- timeFrame : defines the time interval of the data that should be exported.
- observedProperties : the observed properties that should be exported (for example the temperature). These are given comma separated, so that more than one can be exported.
- clusters : A comma separated list of the clusterIDs that should be used for the export.
Will return the String "started" if so.
2 Get Export Status
Sends a request for the status of the export. For example:
example.com/edms/get?requestType=getStatus&downloadID=SomeAlphanumericID
The Server responds with either of the following options:
- true : if the download is ready
- false : if the download is not ready
- error : if an error occurred and the export can not be redone
- noID : if there is no export process for that ID
3 Do a Download
Tries to download the file for that ID (should only be called once got a positive response from Status). For example:
example.com/edms/get?requestType=tryDownload&downloadID=SomeAlphanumericID
Sends the file (zip file), or if not existing or finished sends:
- false : if the download is not ready
- error : if an error occurred and the export can not be redone
- noID : if there is no export process for that ID
4 Get Extensions
Gives a list of all extensions that are supported by the exporter. For example:
example.com/edms/get?requestType=getExtensions
Gives a String looking like "csv,netcdf".